Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8523823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:31:13+00:00 2026-06-11T07:31:13+00:00

I received the following error: TemplateSyntaxError at /accounts/login/ Caught ImportError while rendering: No module

  • 0

I received the following error:

TemplateSyntaxError at /accounts/login/
Caught ImportError while rendering: No module named urls

due to this piece of code in a template:

<a href="{% url index %}">{% trans "Home" %}</a> 

it happened after trying to deploy my django project to an amazon ec2 instance. I am confused as to why this would occur.

here is the full trace:

TemplateSyntaxError at /accounts/login/
Caught ImportError while rendering: No module named urls
Request Method: GET
Request URL:    http://ec2-67-202-59-6.compute-1.amazonaws.com:8000/accounts/login/
Django Version: 1.3
Exception Type: TemplateSyntaxError
Exception Value:    
Caught ImportError while rendering: No module named urls
Exception Location: /opt/bitnami/apps/django/lib/python2.6/site-packages/django/utils/importlib.py in import_module, line 35
Python Executable:  /opt/bitnami/python/bin/.python.bin
Python Version: 2.6.5
Python Path:    
['/opt/bitnami/projects/Project',
 '/opt/bitnami/python/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg',
 '/opt/bitnami/python/lib/python2.6/site-packages/MySQL_python-1.2.3c1-py2.6-linux-i686.egg',
 '/opt/bitnami/python/lib/python2.6/site-packages/haystack-0.16-py2.6.egg',
 '/opt/bitnami/python/lib/python2.6/site-packages/argparse-1.2.1-py2.6.egg',
 '/opt/bitnami/python/lib/python2.6/site-packages/python_ptrace-0.6.4-py2.6.egg',
 '/opt/bitnami/python/lib/python2.6/site-packages/jsonfield-0.9-py2.6.egg',
 '/opt/bitnami/python/lib/python2.6/site-packages/django_pagination-1.0.7-py2.6.egg',
 '/opt/bitnami/python/lib/python2.6/site-packages/django_picklefield-0.2.0-py2.6.egg',
 '/opt/bitnami/python/lib/python2.6/site-packages/django_registration-0.7-py2.6.egg',
 '/opt/bitnami/python/lib/python2.6/site-packages/django_jsonfield-0.8.5-py2.6.egg',
 '/opt/bitnami/python/lib/python2.6/site-packages/South-0.7.3-py2.6.egg',
 '/opt/bitnami/python/lib/python2.6/site-packages/django_haystack-1.2.6-py2.6.egg',
 '/opt/bitnami/apps/django/lib/python2.6/site-packages',
 '/opt/bitnami/projects/Project',
 '/opt/bitnami/python/lib/python26.zip',
 '/opt/bitnami/python/lib/python2.6',
 '/opt/bitnami/python/lib/python2.6/plat-linux2',
 '/opt/bitnami/python/lib/python2.6/lib-tk',
 '/opt/bitnami/python/lib/python2.6/lib-old',
 '/opt/bitnami/python/lib/python2.6/lib-dynload',
 '/opt/bitnami/python/lib/python2.6/site-packages',
 '/opt/bitnami/python/lib/python2.6/site-packages/PIL',
 '/opt/bitnami/projects/Project/cookbook']
Server time:    Tue, 4 Sep 2012 18:56:56 -0500
Template error

In template /opt/bitnami/projects/Project/templates/registration/base.html, error at line 56
Caught ImportError while rendering: No module named urls
46      </div><!--left_pane-container-->
47  </div><!--left_pane-->
48      
49  {% block container %}   
50  <div id="container">    
51      <div id="container_header">
52          <div id="header-content-container">
53                  <div id="container_header-items">
54                          {% block header_items %}
55                          {% endblock %}
56                          <a href="{% url index %}">{% trans "Home" %}</a> | 
57                          {% if user.is_authenticated %}
58                          {{ user.username }} 
59                          (<a href="{% url auth_logout %}">{% trans "Log out" %}</a> | 
60                          <a href="{% url auth_password_change %}">{% trans "Change password" %}</a>)
61                          <form action="/search/" method="get">
62                              <label for="id_q">Search:</label>
63                              <input id="id_q" name="q" type="text">
64                              <input type="submit" value="Submit">
65                          </form>
66                          {% else %}

here is the full traceback:

Environment:


Request Method: GET
Request URL: http://ec2-67-202-59-6.compute-1.amazonaws.com:8000/accounts/login/

Django Version: 1.3
Python Version: 2.6.5
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.comments',
 'django.contrib.sites',
 'django.contrib.staticfiles',
 'django.contrib.admin',
 'django.contrib.admindocs',
 'pagination',
 'cookbook',
 'registration',
 'ajax_validation',
 'south',
 'django.contrib.humanize',
 'accounts',
 'haystack',
 'json']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'pagination.middleware.PaginationMiddleware')


Template error:
In template /opt/bitnami/projects/Project/templates/registration/base.html, error at line 56
   Caught ImportError while rendering: No module named urls
   46 :     </div><!--left_pane-container-->


   47 : </div><!--left_pane-->


   48 :     


   49 : {% block container %}   


   50 : <div id="container">    


   51 :     <div id="container_header">


   52 :         <div id="header-content-container">


   53 :                 <div id="container_header-items">


   54 :                         {% block header_items %}


   55 :                         {% endblock %}


   56 :                         <a href=" {% url index %} ">{% trans "Home" %}</a> | 


   57 :                         {% if user.is_authenticated %}


   58 :                         {{ user.username }} 


   59 :                         (<a href="{% url auth_logout %}">{% trans "Log out" %}</a> | 


   60 :                         <a href="{% url auth_password_change %}">{% trans "Change password" %}</a>)


   61 :                         <form action="/search/" method="get">


   62 :                             <label for="id_q">Search:</label>


   63 :                             <input id="id_q" name="q" type="text">


   64 :                             <input type="submit" value="Submit">


   65 :                         </form>


   66 :                         {% else %}


Traceback:
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/utils/decorators.py" in _wrapped_view
  93.                     response = view_func(request, *args, **kwargs)
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  79.         response = view_func(request, *args, **kwargs)
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/contrib/auth/views.py" in login
  69.                               context_instance=RequestContext(request, current_app=current_app))
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/shortcuts/__init__.py" in render_to_response
  20.     return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs)
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/template/loader.py" in render_to_string
  188.         return t.render(context_instance)
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/template/base.py" in render
  123.             return self._render(context)
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/template/base.py" in _render
  117.         return self.nodelist.render(context)
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/template/base.py" in render
  744.                 bits.append(self.render_node(node, context))
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/template/debug.py" in render_node
  73.             result = node.render(context)
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/template/loader_tags.py" in render
  127.         return compiled_parent._render(context)
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/template/base.py" in _render
  117.         return self.nodelist.render(context)
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/template/base.py" in render
  744.                 bits.append(self.render_node(node, context))
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/template/debug.py" in render_node
  73.             result = node.render(context)
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/template/loader_tags.py" in render
  64.             result = block.nodelist.render(context)
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/template/base.py" in render
  744.                 bits.append(self.render_node(node, context))
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/template/debug.py" in render_node
  73.             result = node.render(context)
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/template/loader_tags.py" in render
  64.             result = block.nodelist.render(context)
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/template/base.py" in render
  744.                 bits.append(self.render_node(node, context))
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/template/debug.py" in render_node
  73.             result = node.render(context)
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/template/defaulttags.py" in render
  437.             url = reverse(view_name, args=args, kwargs=kwargs, current_app=context.current_app)
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/core/urlresolvers.py" in reverse
  391.             *args, **kwargs)))
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/core/urlresolvers.py" in reverse
  312.         possibilities = self.reverse_dict.getlist(lookup_view)
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/core/urlresolvers.py" in _get_reverse_dict
  229.             self._populate()
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/core/urlresolvers.py" in _populate
  208.                     for name in pattern.reverse_dict:
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/core/urlresolvers.py" in _get_reverse_dict
  229.             self._populate()
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/core/urlresolvers.py" in _populate
  197.         for pattern in reversed(self.url_patterns):
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/core/urlresolvers.py" in _get_url_patterns
  279.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/core/urlresolvers.py" in _get_urlconf_module
  274.             self._urlconf_module = import_module(self.urlconf_name)
File "/opt/bitnami/apps/django/lib/python2.6/site-packages/django/utils/importlib.py" in import_module
  35.     __import__(name)

Exception Type: TemplateSyntaxError at /accounts/login/
Exception Value: Caught ImportError while rendering: No module named urls
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:31:15+00:00Added an answer on June 11, 2026 at 7:31 am

    I restarted my amazon instance and did everything over and it worked the second time around

    thanks

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I received the following error while trying to login to a secured directory. As
I received this error on following code.Is this + sign is not available in
I am received the following error while trying to implement a C# extension function
I followed this tutorial exactly and received the following error after trying to upload
I received the following error when I tried to run a C# WinForms application
I am trying to initialize NSDictionary but it gives me following error: Program received
I receive the following error in Microsoft SQL Server Report Builder Error While generating
In my application I receive the following error: The context cannot be used while
I installed the latest stable xampp package, and received the following error page when
I received the following error: Undefined symbols: _OBJC_CLASS_$_SurveyDelegate, referenced from: objc-class-ref-to-SurveyDelegate in Menus.o ld:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.