check if you import login view in url.py to be like this :
from django.contrib.auth.views import login
and also check your pattern in url.py to be like this :
site_media=os.path.join(os.path.dirname(__file__),'site_media')
urlpatterns = patterns(' ',
(r'^login/$',login), )
and dont change the location of login.html in registration.html
On Feb 28, 6:01 am, hack <scottma...@gmail.com> wrote:
> I'm attempting to follow the instructions on the Django website and
> use the registration/login.html. I created the file in myapp/
> registration/login.html.
>
> I've added the following to my urls.py file:
> url(r'^login/$', 'django.contrib.auth.views.login'),
>
> When I attempt to access /myapp/login I get the following error:
> Could not import hcp.views.django.contrib.auth.views. Error was: No
> module named django.contrib.auth.views
>
> I did setup my urls file by moving it into the myapp directory and
> putting the following in the original:
> url(r'^myapp/',include('myapp.urls')),
>
> Any suggestions on why django thinks the template doesn't exist? Any
> help would be greatly appreciated. Thanks.
--
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.
No comments:
Post a Comment