Try <a href="{% url auth_login %}?next=/somelink">Sign in

On Mon, Dec 3, 2012 at 6:01 PM, Loai Ghoraba <loai1...@gmail.com> wrote:

> Hi
>
> 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+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Regards
Nikhil Verma
+91-958-273-3156

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to