Friday, August 12, 2011

Re: Django 1.3 admin added methods login requirement

On Fri, Aug 12, 2011 at 10:32 AM, Chris Fraschetti
<chrisf@ivrtechnology.com> wrote:
> I believe that in earlier versions of django if you added a view
> method to an admin, and extended the get_urls method that because it
> was under the admin it would automatically require at least a log in
> (user.is_authenticated()=True.  I have been working with Django 1.3
> and have noticed that this is no longer the case?  Has anyone
> experienced this and is there a solution such as a decorator to use
> since login_required will not work with methods.

I don't believe admin views have ever been automatically protected. In
any case, you'll need to use the admin site's ``admin_view``
decorator. See https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.get_urls
for details.

Jacob

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate