1

I'm a newbie to Django and now I'm trying to make a simple webshop using it. Today I realized that I need some debug tool, so I've chosen django-debug-toolbar. I setup it just like it's explained here - How do I see the Django debug toolbar?. But when I set DEBUG to True I get a message -

Page not found (404)
Request Method: GET
Request URL:    http://127.0.0.1:8000/
    Using the URLconf defined in urlconf, Django tried these URL patterns, in this order:
    ^__debug__/m/(.*)$
    ^__debug__/sql_select/$ [name='sql_select']
    ^__debug__/sql_explain/$ [name='sql_explain']
    ^__debug__/sql_profile/$ [name='sql_profile']
    ^__debug__/template_source/$ [name='template_source']
    The current URL, , didn't match any of these.
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.

Here is my app's urls.py:

from django.conf.urls import patterns, url

urlpatterns = patterns('ecommerce.views',
    url(r'^profile/$', 'profile'),
    url(r'^login/$', 'login_user'),
    url(r'^logout/$', 'logout_user'),
    url(r'^registration/$', 'registration'),
)

As far as I can see now django looks for appropriate urls not in my app's urls.py, but somewhere else.

Community
  • 1
  • 1
Aleksei Yerokhin
  • 869
  • 4
  • 9
  • 22
  • can you update the question with the full traceback, and the urls.py ? – karthikr Jun 18 '13 at 14:44
  • 1
    Your requested url is `http://127.0.0.1:8000/` and you do not have a URL target for `/`. What does your main urls.py look like ? – karthikr Jun 18 '13 at 14:56
  • Please, can you post your `ROOT_URLCONF` in your `settings.py` and also the file it's pointing? – Paulo Bu Jun 18 '13 at 15:09
  • Thanks a lot! You have guided me on the right path.I edited my main urls.py like that: from django.conf.urls import patterns, include, url urlpatterns = patterns('', url(r'^ecommerce/', include('ecommerce.urls')) ) and now browser gives the correct response. – Aleksei Yerokhin Jun 18 '13 at 15:18

0 Answers0