0

I followed http://blog.narenarya.in/right-way-django-authentication.html in order to add a user authentication in my Django project but when I migrate an error occured in my project urls.py but I didn't find it !!! newsite/newsite/urls.py

from django.conf.urls import include, url
from django.contrib import admin
from aps import views
from mail import views
from log import views
from django.contrib.auth import views
from log.forms import LoginForm

urlpatterns = [
url(r'^admin/', admin.site.urls),    
url(r'^aps/', include('aps.urls')),
url(r'^mail/', include('mail.urls')),
url(r'^log/', include('log.urls')),
url(r'^login/$', views.login, {'template_name': 'login.html', 'authentication_form': LoginForm},
url(r'^logout/$', views.logout, {'next_page': '/login'}), 
]

2 Answers 2

3

You're missing the last ).

url(r'^login/$', views.login, {'template_name': 'login.html', 'authentication_form': LoginForm}),
Sign up to request clarification or add additional context in comments.

1 Comment

oh thannks , I wasn't in my mood while writing :)
0

I highly suggest you go back to the link that you provided as your source. You've miscopied some of the code. For example this line from the example provided:

url(r'^admin/', include(admin.site.urls)),

You did not provide the error message/trace you received, so of the couple of problems it could be, its impossible to say which one is giving you the error you are currently receiving -- but again, compare your code to the example for errors (including in indentation). If it still doesn't work, provide the error message you receive

1 Comment

Thank you I've missed a ) :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.