I have this in my urls.py
url(r'^accounts/login/$', login,name="accounts-login")
and in a template base.html
<a href="{%url accounts-login%}?next=/somelink/">login</a>
And when I try to open the site, this error is raised: Template syntax error: Could not parse the remainder: '-login' from 'accounts-login'
But when I change the name of the url in both urls.py and base.html to something without the score '-', it works: like :accountslogin.
So are scores banned in named urls ? I have seen scored-named-urls in the documentation !
Thanks in advance.
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/g19mRQ4vHd4J.
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