@library.global_function
def profile_url(user, edit=False):
 if edit:
  return reverse('users.edit_profile', args=[user.username])
 return reverse('users.profile', args=[user.username])

@ library . global_function def profile_url ( user , edit = False ) : if edit : return reverse ( 'users.edit_profile' , args = [ user . username ] ) return reverse ( 'users.profile' , args = [ user . username ] )
return a url to the users profile .