Right. I think option A makes the most sense but I wanted to float the question here.
I should probably pass the template something and rework this in my views. Thanks, - Scott On Aug 20, 12:28 pm, Javier Guerra <jav...@guerrag.com> wrote: > On Thu, Aug 20, 2009 at 11:00 AM, Streamweaver<streamwea...@gmail.com> wrote: > > For permission checking in my views this was pretty straight forward. > > I created a decorator called has_perm_or_owner that checks for > > particular permissions or if a user is an object owner. > > > My question is how do I handle similar checks in my templates? > > two solutions: > > a) you don't. the view should check and give the template only what's needed > > b) the 'django.core.context_processors.auth' context processor (which > is in the default if you use RequestContext) includes the {{perms}} > object:http://docs.djangoproject.com/en/dev/topics/auth/#authentication-data... > > -- > Javier --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---