I have created a password_change_done
template.
But I need to to show a Back to Dashboard
button for Employees and a Back to Profile
for Customers.
How can I achieve this through UserGroup checking, without messing with the views.py
?
I have created a password_change_done
template.
But I need to to show a Back to Dashboard
button for Employees and a Back to Profile
for Customers.
How can I achieve this through UserGroup checking, without messing with the views.py
?
Then you have to use the
filter
of the template as below...In your app create a folder 'templatetags'. In this folder create two files:
The folder structure looks like ...
get_group.py file :
Then in your html page use it as below...