Hi everyone,

Am I using a correct version of django? I install this using a rpm and I 
also have other django apps running on the same box.
As you can see I am getting a template error. How can I fix this?


Environment:


Request Method: GET
Request URL: 
http://mysite.com/reviews/account/login/?next_page=/reviews/dashboard/

Django Version: 1.5.4
Python Version: 2.6.6
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.markup',
 'django.contrib.sites',
 'django.contrib.sessions',
 'django.contrib.staticfiles',
 'djblets.datagrid',
 'djblets.extensions',
 'djblets.feedview',
 'djblets.gravatars',
 'djblets.log',
 'djblets.pipeline',
 'djblets.siteconfig',
 'djblets.util',
 'djblets.webapi',
 'pipeline',
 'reviewboard.accounts',
 'reviewboard.admin',
 'reviewboard.attachments',
 'reviewboard.changedescs',
 'reviewboard.diffviewer',
 'reviewboard.extensions',
 'reviewboard.hostingsvcs',
 'reviewboard.notifications',
 'reviewboard.reviews',
 'reviewboard.reviews.ui',
 'reviewboard.scmtools',
 'reviewboard.site',
 'reviewboard.ssh',
 'reviewboard.webapi',
 'django_evolution']
Installed Middleware:
['django.middleware.gzip.GZipMiddleware',
 'reviewboard.admin.middleware.InitReviewBoardMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'django.middleware.http.ConditionalGetMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'djblets.siteconfig.middleware.SettingsMiddleware',
 'reviewboard.admin.middleware.LoadSettingsMiddleware',
 'djblets.extensions.middleware.ExtensionsMiddleware',
 'djblets.log.middleware.LoggingMiddleware',
 'reviewboard.accounts.middleware.TimezoneMiddleware',
 'reviewboard.admin.middleware.CheckUpdatesRequiredMiddleware',
 'reviewboard.admin.middleware.X509AuthMiddleware',
 'reviewboard.site.middleware.LocalSiteMiddleware',
 'djblets.extensions.middleware.ExtensionsMiddlewareRunner']


Template error:
In template 
/usr/lib/python2.6/site-packages/reviewboard/templates/base.html, error at 
line 81
   Could not parse the remainder: '-preferences' from 'user-preferences'. 
The syntax of 'url' changed in Django 1.5, see the docs.
   71 :     <ul id="accountnav">


   72 :      <li>


   73 :       <a href="#">{% trans "Support" %} &#9662;</a>


   74 :       <ul>


   75 :        <li><a href="http://www.reviewboard.org/docs/manual/1.7/";>{% 
trans "Documentation" %}</a></li>


   76 :        <li><a href="{% url support %}">{% trans "Get Support" 
%}</a></li>


   77 :       </ul>


   78 :      </li>


   79 : {% if user.is_authenticated %}


   80 :      <li>


   81 :       <a class="user-nav-item" href=" {% url user-preferences %} 
">{% gravatar user 32 %} {{user.first_name}} &#9662;</a>


   82 :       <ul>


   83 :        <li><a href="{% url user-preferences %}">{% trans "My 
account" %}</a></li>


   84 : {%  if user.is_staff %}


   85 :        <li><a href="{% url reviewboard.admin.views.dashboard %}">{% 
trans "Admin" %}</a></li>


   86 : {%  endif %}


   87 :        <li><a href="{% url logout %}">{% trans "Log out" %}</a></li>


   88 :       </ul>


   89 :      </li>


   90 : {% else %}


   91 :      <li><a href="{% url login %}?next_page={{request.path}}">{% 
trans "Log in" %}</a></li>


Traceback:
File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in 
get_response
  140.                     response = response.render()
File "/usr/lib/python2.6/site-packages/django/template/response.py" in 
render
  105.             self.content = self.rendered_content
File "/usr/lib/python2.6/site-packages/django/template/response.py" in 
rendered_content
  82.         content = template.render(context)
File "/usr/lib/python2.6/site-packages/django/template/base.py" in render
  140.             return self._render(context)
File "/usr/lib/python2.6/site-packages/django/template/base.py" in _render
  134.         return self.nodelist.render(context)
File "/usr/lib/python2.6/site-packages/django/template/base.py" in render
  830.                 bit = self.render_node(node, context)
File "/usr/lib/python2.6/site-packages/django/template/debug.py" in 
render_node
  74.             return node.render(context)
File "/usr/lib/python2.6/site-packages/django/template/loader_tags.py" in 
render
  102.         compiled_parent = self.get_parent(context)
File "/usr/lib/python2.6/site-packages/django/template/loader_tags.py" in 
get_parent
  99.         return get_template(parent)
File "/usr/lib/python2.6/site-packages/django/template/loader.py" in 
get_template
  146.     template, origin = find_template(template_name)
File "/usr/lib/python2.6/site-packages/django/template/loader.py" in 
find_template
  135.             source, display_name = loader(name, dirs)
File "/usr/lib/python2.6/site-packages/django/template/loader.py" in 
__call__
  43.         return self.load_template(template_name, template_dirs)
File "/usr/lib/python2.6/site-packages/django/template/loaders/cached.py" 
in load_template
  47.             template, origin = self.find_template(template_name, 
template_dirs)
File "/usr/lib/python2.6/site-packages/django/template/loaders/cached.py" 
in find_template
  34.                 template, display_name = loader(name, dirs)
File "/usr/lib/python2.6/site-packages/django/template/loader.py" in 
__call__
  43.         return self.load_template(template_name, template_dirs)
File "/usr/lib/python2.6/site-packages/django/template/loader.py" in 
load_template
  49.             template = get_template_from_string(source, origin, 
template_name)
File "/usr/lib/python2.6/site-packages/django/template/loader.py" in 
get_template_from_string
  157.     return Template(source, origin, name)
File "/usr/lib/python2.6/site-packages/django/template/base.py" in __init__
  125.         self.nodelist = compile_string(template_string, origin)
File "/usr/lib/python2.6/site-packages/django/template/base.py" in 
compile_string
  153.     return parser.parse()
File "/usr/lib/python2.6/site-packages/django/template/base.py" in parse
  274.                     compiled_result = compile_func(self, token)
File "/usr/lib/python2.6/site-packages/django/template/loader_tags.py" in 
do_block
  190.     nodelist = parser.parse(('endblock',))
File "/usr/lib/python2.6/site-packages/django/template/base.py" in parse
  274.                     compiled_result = compile_func(self, token)
File "/usr/lib/python2.6/site-packages/django/template/defaulttags.py" in 
do_if
  905.     nodelist = parser.parse(('elif', 'else', 'endif'))
File "/usr/lib/python2.6/site-packages/django/template/base.py" in parse
  274.                     compiled_result = compile_func(self, token)
File 
"/usr/lib/python2.6/site-packages/reviewboard/site/templatetags/localsite.py" 
in url
  51.     return LocalSiteURLNode(django_url(parser, token))
File "/usr/lib/python2.6/site-packages/django/template/defaulttags.py" in 
url
  1268.         viewname = parser.compile_filter(bits[1])
File "/usr/lib/python2.6/site-packages/django/template/base.py" in 
compile_filter
  353.         return FilterExpression(token, self)
File "/usr/lib/python2.6/site-packages/django/template/base.py" in __init__
  570.                                       "from '%s'" % (token[upto:], 
token))

Exception Type: TemplateSyntaxError at /reviews/account/login/
Exception Value: Could not parse the remainder: '-preferences' from 
'user-preferences'. The syntax of 'url' changed in Django 1.5, see the docs.

-- 
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to