Hello folk,
I have a problem with my submit_line.html. I added a button through " input
type="submit" value="{% trans 'Send Email' %}" name="_send_email" />" to
send an email. In my admin.py of my app I override the save_model method to
send an email and save the new istance created inside the database. For
this everything is good and work. Furthermore, I want to show my new button
just for the staff users and not for the superusers. but it doesn't work.
To do this I added {% if request.user.is_superuser%} but it doesn't
work. It seems that the variable user is outside the scope. How can I fix
this?
Thanks in advance,
Alessandro. :)
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/0f8130ca-c8c4-48fa-90a2-c21fde3e45bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.