Hi all

I have a template and request is being passed to it and so I expected that
{{ perms }} would be availablke as in Chap 12 of the Django book.

I have this:

Permissions:
{% for permission in in request.user.get_all_permissions %}
        + {{ permission }}
{% endfor %}

{% if perms.lab %}
        yes you have permissions
{% else %}
        no permissions
{% endif %}

On output I get:

Permissions:
   + lab.change_test
   + lab.delete_test
   + lab.add_test
no permissions


I get the same "no permissions" if I try {% if perms.lab %} or {% if perms %}

What am I doing wrong?

Mike

-- 
Michael Lake




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to