I've just done a fresh install of Django and Django-CMS from the ground up (including a brand new virtualenv and python build). I'm getting this bizzarre error.. google has been no help. Ideas?
TemplateSyntaxError at /
Caught AttributeError while rendering: 'str' object has no attribute 'regex'
In template /Users/bdunlay/python/python-2.5/lib/python2.5/site-packages/django_cms2.1.0.beta3-py2.5.egg/cms/templates/cms/new.html, error at line 37
Here's the line:
37: <li>Log into <a href="{% url admin:index %}">admin</a> and <a href="{% url pages-root %}admin/cms/page/add/">add</a> some pages.</li>
more stuff
/Users/bdunlay/python/python-2.5/lib/python2.5/site-packages/Django-1.3-py2.5.egg/django/core/urlresolvers.py in _populate
return '<%s %s (%s:%s) %s>' % (self.__class__.__name__, self.urlconf_name, self.app_name, self.namespace, self.regex.pattern)
def _populate(self):
lookups = MultiValueDict()
namespaces = {}
apps = {}
for pattern in reversed(self.url_patterns):
--> p_pattern = pattern.regex.pattern ...
if p_pattern.startswith('^'):
p_pattern = p_pattern[1:]
if isinstance(pattern, RegexURLResolver):
if pattern.namespace:
namespaces[pattern.namespace] = (p_pattern, pattern)
if pattern.app_name:
Just had this error. In my case it was caused by having tripple quoted string (comment) in urls.py patterns.
Actually it was not interpreted as a comment and was passed to function!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With