from django.conf.urls import patterns, include, url
urlpatterns= patterns('',
(r'^registration/', include('apps.registration.urls')),
(r'', 'django.contrib.auth.views.login'),
)
-------------------------------------
urls.py (registration)
-----------------------------------------
from django.conf.urls import patterns, include, url
urlpatterns= patterns('',
(r'^login/$', 'django.contrib.auth.views.login'),
)
-----------------------------------------
login.html (in templates/registration)
-------------------------------------------------------------
{{ form }}
{% url "django.contrib.auth.views.login" %} <---here is the problem. It's just an stupid test for the problem
-------------------------------------------------------------
Fail with:
- {% url django.contrib.auth.views.login %}
- {% url 'django.contrib.auth.views.login' %}
- {% url "django.contrib.auth.views.login" %}
I add this at the end of the file "settings.py":
----------------------------------------------------------
import django.template
django.template.add_to_builtins('django.templatetags.future')
----------------------------------------------------------
Including or excluding the last lines doesn't matter. The problem appear in the both cases.
I'm using Django 1.4, and Python 2.6 over Centos 6.2. Maybe I must to include something else in the settings?
Thanks for read and sorry for my bad english.