Why This Url Pattern Is Not Working?
from views import login from django.conf.urls.defaults import * urlpatterns = patterns('', *** (r'([a-zA-Z0-9]+)/login/$', login, name='login'), ) showing me the syntax error
Solution 1:
You need to use the url()
function if you're using the name keyword:
url(r'([a-zA-Z0-9]+)/login/$', login, name='login'),
And the order of parameters to the {% url %}
tag has the url name first. So it should be:
{% url login slug %}
Solution 2:
tuple
literals don't have named arguments. Try url()
instead.
url(r'([a-zA-Z0-9]+)/login/$', login, name='login'),
Solution 3:
the way u are using the {% url slug login %} is not the correct syntax you have to write the name which you wrote in your urls for that template, i.e {% url login %} This is according to your url, try this it will work.........
Post a Comment for "Why This Url Pattern Is Not Working?"