code: def profile_url(obj, profile_app_name, profile_model_name):
      
      try:
          content_type = ContentType.objects.get(
              app_label=profile_app_name,
              model=profile_model_name.lower()
          )
          profile = content_type.get_object_for_this_type(user=obj.user)
          return profile.get_absolute_url()
      except ContentType.DoesNotExist:
          return ""
      except AttributeError:
          return ""
docs: returns profile url of user