Hi

Aidas asked .....
> Is "django.core.context_processors.auth" set in your
> TEMPLATE_CONTEXT_PROCESSORS? Are those new custom permissions in the
> auth_permission table? If not - try to delete the test tables and
> syncdb again.

1. TEMPLATE_CONTEXT_PROCESSORS is not in my settings file. But the docs say 
that its default is: ("django.core.context_processors.auth", etc...

2. Are the permissions in the auth_permissions table?
I'm not really sure They are listed in the graphical admin page/users/ page 
when you edit a user listed there. The table shows 'Available user permissions' 
and 'Chosen user permissions' and I have added them to the later. I don't know 
if they are custom permissions - I didn't do anything explicit to add then. 
Django got them from my models automatically. 

3. You suggested to reload the Test tables. I have done that via sqlite3 and 
dropped the Test table then did.
$ python manage.py syncdb
Creating table lab_test
$

My template still gives the same output. 

> On 5/23/07, Michael Lake <[EMAIL PROTECTED]> wrote:
> >
> > 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