Reputation: 1609
How to display user group of logged in user in django admin change_form.html ? I want to display the group name of the logged in user in the change_form of a model. Eg I am able to display the user name by using {{ user }} tag. How to display {{ user.groups__name }}
Upvotes: 1
Views: 1233
Reputation: 9943
Not sure if you can do it directly in the template though you can try iterating over user.groups.all()
Upvotes: 2