How can I add a custom method to auth_user model class? I need to return a
calculated field along with results
I want to be able to write something like:
#extend user model with this method
def get_manager():
#call some api to get the manager
return user_manager
and to be able to display this in the template, like:
{{ user.get_manager }}
No comments:
Post a Comment