Re: contrib.auth.views - n00b question
You probably don't want to reference the login view to /accounts. You
probably mean to do this:
(r'^accounts/', include ('django.contrib.auth.urls'),
That will map /accounts/login to django.contrib.views.login, /accounts/
logout to django.contrib.views.logout, etc.
In general, when using an app, you'll add a line to your base URLConf
that includes that app's urls module.
On Jul 6, 9:04 am, Tom Evans <tevans...@googlemail.com> wrote:
> On Tue, Jul 6, 2010 at 2:00 PM, reduxdj <patricklemi...@gmail.com> wrote:
> > Hi,
>
> > I have an issue where i am including contrib.auth into my URLs,
> > however, I get this error:
>
> > my url pattern:
>
> > (r'^accounts/', include('django.contrib.auth.views.login')),
>
> django.contrib.auth.views.login is a view, not a url pattern, so you
> don't include it, you reference it:
>
> (r'^accounts/', 'django.contrib.auth.views.login'),
>
> Cheers
>
> Tom
--
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