Thank so much! I've figured it out. Have fun :) On Feb 6, 8:55 pm, Sandro Dutra <hexo...@gmail.com> wrote: > If I understand you're writing a template for admin, and this is not > required 'cause the admin template is called by the contrib > 'django.contrib.admin', in INSTALLED_APPS (settings file), only if you > want to customize admin, you can override the admin files, putting > them o 'yourtemplatesdir/admin/', and I think this is not the case. > > The only required steps to see the admin page is: > 1. Check if 'django.contrib.admin' is uncommented in 'settings.py'; > 2. Uncomment the required lines in file 'urls.py'; > 3. Launch the dev server and acess localhost/admin/. > > Only this, nothing more... > > Templates.py? Templates can have any extension, this is true, but > usually we put .html or .htm... > > 2012/2/6 akaariai <akaar...@gmail.com>: > > > > > > > > > On Feb 6, 5:09 pm, coded kid <duffleboi...@gmail.com> wrote: > >> 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! > > > I don't spot any immediate reason for your problem. Some more > > information is needed. A full stacktrace is always really good if you > > happen to get one. Maybe the problem is in your admin.py. As said, it > > is hard to say without more information. > > > - Anssi > > > -- > > 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+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/django-users?hl=en.
-- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.