code: def add_relationship_url(user, status):
      
      if isinstance(status, RelationshipStatus):
          status = status.from_slug
      return reverse('relationship_add', args=[user.username, status])
docs: Generate a url for adding a relationship on a given user.  ``user`` is a
      User object, and ``status`` is either a relationship_status object or a
      string denoting a RelationshipStatus
  
      Usage::
  
          href="{{ user|add_relationship_url:"following" }}"