Project name inserted automatically in url when using django template url tag
- by thebossman
I am applying the 'url' template tag to all links in my current Django project.
I have my urls named like so...
url(r'^login/$', 'login', name='site_login'),
This allows me to access /login at my site's root. I have my template tag defined like so...
<a href="{% url site_login %}">
It works fine, except that Django automatically resolves that url as /myprojectname/login, not /login. Both urls are accessible. Why? Is there an option to remove the projectname? This occurs for all url tags, not just this one.