Thursday, March 28, 2013

'url' template tag throws and error after upgrading to 1.4

Hi,

I am trying to upgrade an existing project from 1.3 to 1.4.5. I have it almost done but when I try to load the home page, in the base.html I have this line:

<script type="text/javascript" src="{% url django.views.i18n.javascript_catalog %}"></script>

and it throws an error: No module named views.

When I replace the tag with the real url (/jsi18n/) then the error disappears but it reappears a little further with another 'url' template tag. So I believe something is wrong with this
specific template tag. I have no idea how to debug it. Is there something obvious that I missed when upgrading to 1.4?

Here is the traceback:

Traceback:
File "/home/env/project/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  136.                     response = response.render()
File "/home/env/project/lib/python2.7/site-packages/django/template/response.py" in render
  104.             self._set_content(self.rendered_content)
File "/home/env/project/lib/python2.7/site-packages/django/template/response.py" in rendered_content
  81.         content = template.render(context)
File "/home/env/project/lib/python2.7/site-packages/django/template/base.py" in render
  140.             return self._render(context)
File "/home/env/project/lib/python2.7/site-packages/django/test/utils.py" in instrumented_test_render
  62.     return self.nodelist.render(context)
File "/home/env/project/lib/python2.7/site-packages/django/template/base.py" in render
  823.                 bit = self.render_node(node, context)
File "/home/env/project/lib/python2.7/site-packages/django/template/debug.py" in render_node
  74.             return node.render(context)
File "/home/env/project/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  123.         return compiled_parent._render(context)
File "/home/env/project/lib/python2.7/site-packages/django/test/utils.py" in instrumented_test_render
  62.     return self.nodelist.render(context)
File "/home/env/project/lib/python2.7/site-packages/django/template/base.py" in render
  823.                 bit = self.render_node(node, context)
File "/home/env/project/lib/python2.7/site-packages/django/template/debug.py" in render_node
  74.             return node.render(context)
File "/home/env/project/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  123.         return compiled_parent._render(context)
File "/home/env/project/lib/python2.7/site-packages/django/test/utils.py" in instrumented_test_render
  62.     return self.nodelist.render(context)
File "/home/env/project/lib/python2.7/site-packages/django/template/base.py" in render
  823.                 bit = self.render_node(node, context)
File "/home/env/project/lib/python2.7/site-packages/django/template/debug.py" in render_node
  74.             return node.render(context)
File "/home/env/project/lib/python2.7/site-packages/django/template/defaulttags.py" in render
  411.             url = reverse(view_name, args=args, kwargs=kwargs, current_app=context.current_app)
File "/home/env/project/lib/python2.7/site-packages/django/core/urlresolvers.py" in reverse
  476.     return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
File "/home/env/project/lib/python2.7/site-packages/django/core/urlresolvers.py" in _reverse_with_prefix
  363.         possibilities = self.reverse_dict.getlist(lookup_view)
File "/home/env/project/lib/python2.7/site-packages/django/core/urlresolvers.py" in reverse_dict
  276.             self._populate()
File "/home/env/project/lib/python2.7/site-packages/django/core/urlresolvers.py" in _populate
  265.                 lookups.appendlist(pattern.callback, (bits, p_pattern, pattern.default_args))
File "/home/env/project/lib/python2.7/site-packages/django/core/urlresolvers.py" in callback
  216.         self._callback = get_callable(self._callback_str)
File "/home/env/project/lib/python2.7/site-packages/django/utils/functional.py" in wrapper
  27.         result = func(*args)
File "/home/env/project/lib/python2.7/site-packages/django/core/urlresolvers.py" in get_callable
  92.                 lookup_view = getattr(import_module(mod_name), func_name)
File "/home/env/project/lib/python2.7/site-packages/django/utils/importlib.py" in import_module
  35.     __import__(name)

Exception Type: ImportError at /
Exception Value: No module named views

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment