Jeremy Dunck wrote:
> On 5/23/07, Michael Lake <[EMAIL PROTECTED]> wrote:
> ...
> >      return render_to_response('lab/user.html', data)
>
> Yeah, that's your problem right there.
> :
> ... I imagine this bites a lot of people on the ass.  :(

Add me to the list of ass-bitten and extremely frustrated.  I followed
the tutorials through (including the part about the
render_to_response() shortcut), but when I started adding permission
levels to my own app, was left scratching my head when the
{{perms.foo}} feature didn't work at all.
(http://www.djangoproject.com/documentation/authentication/)

After trying every goofy combination of dot-syntax I could think of,
passing my own 'perms' to the shortcut as data (which I knew wasn't
right),
  { 'perms': httpreq.user.get_all_permissions(), }
and snooping in django/core/context_processors.py without any magical
insight,
I finally caved in and joined this list.

And, sure enough, it wasn't just me!

I'm WAY too much of a Python & Django noob to suggest design changes,
but...
Any chance of getting the _DOCS_ updated?

For example, it would be nice if the first place {{perms.foo}} was
mentioned would at least hint that it wouldn't work in conjunction
with the render_to_response() shortcut, or perhaps it could introduce
the RequestContext class (which I never would've _heard_ of, except
for this thread).

(Anyways, thanks to Jeremy for the explanation/solution, I'm at least
making some progress again now that I've got my own shortcut function
to replace render_to_response())


--~--~---------~--~----~------------~-------~--~----~
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