Hello list

I know, this question has been posted and resolved before, but the 
solutions don't work in my situation. I don't know why.

When I try to use the "url" tag in any template an exception is raised:
"'str' object has no attribute 'regex'"

for example, with this I got the error:
------------------------------------
urls.py (main)
-------------------------------------
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.












-- 
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/-/JoW317aiojgJ.
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