Jeremy Dunck wrote:
> Should be:
> 
> from django.template import RequestContext
> ctx = RequestContext(request, data)
> return render_to_response('lab/user.html', context_instance=ctx)

Ah ha :-) Now it works and I get...

perms={% if perms.lab %}
      yes perms {{ perms.lab }}
{% else %}
      no perms
{% endif %}

Now gives...

perms= yes perms
Set(['lab.change_test', 'lab.add_test', 'lab.add_experiment', 
'lab.delete_experiment', 'lab.delete_test', 'lab.change_experiment'])

Thanks Jeremy, Martin & Aidas for your help.

I notice it's a Set object comprising a single list. So I thought I could do 
this:

{% for item in perms.lab %}
        {{ item }}
{% endfor %}

But the above just seems to hand the browser and waits and waits...


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