Monday, February 6, 2012

No Module named URLS

Hey guys, I'm getting an error when trying to visit my admin page:
TemplateSyntaxError at /admin/
Caught ImportError while rendering: No module named urls

In urls.py
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
(r'^admin/',include(admin.site.urls)),
)

In Template.py

<!-- Header --> <div id="header"> <div id="branding">
{% block branding %}{% endblock %}
</div> {% if user.is_active and user.is_staff %}
<div id="user-tools"> {% trans 'Welcome,' %} <strong>{% filter
force_escape %}{% firstof user.first_name user.username %}{% endfilter
%}</strong>.
{% block userlinks %} {% url 'django-admindocs-docroot' as docsroot
%} {% if docsroot %} <a href="{{ docsroot }}">{% trans
'Documentation' %}</a> {% endif %} {% url 'admin:password_change' as
password_change_url %} {% if password_change_url %} 37 <a
href="{{ password_change_url }}"> {% else %} <a href="{{ root_path }}
password_change/"> 40 {% endif %} 41 {% trans 'Change password' %}</
a> /

What do you think is the problem! I've been fighting with this for the
pas 15hrs yet no success. Kindly help me out!

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

No comments:

Post a Comment