Should exceptions in dev server appear as tracebacks in the console by default?

8 views
Skip to first unread message

hjwp

unread,
Dec 23, 2013, 10:11:35 AM12/23/13
to django...@googlegroups.com
The docs say:

"All messages reaching the django catch-all logger when DEBUG is True are sent to the console. They are simply discarded (sent to NullHandler) when DEBUG is False."

https://docs.djangoproject.com/en/1.6/topics/logging/#django-s-default-logging-configuration

From reading that, I would (naively?) expect to see tracebacks in the terminal I'm running manage.py runserver, if any of my views raise an exception for example. I don't see any, however.

Is this because the exception is caught, in that it gets intercepted and turned into the nice django debug page?  Am i misinterpreting the docs?  If so, would it be worth adding a couple of words of clarification in case anyone else might misread it like me?  Assuming anyone is that silly?

Of course, I would rather prefer it if exception tracebacks did go to the console by default, as well as to mail_admins and/or to a nice django debug page...

hp

PS minimal repro:

django-admin.py startproject myproj
python manage.py startapp myapp

urls.py:

from django.conf.urls import patterns, include, url
urlpatterns = patterns('',
    # Examples:
    url(r'^$', 'myapp.views.home', name='home'),
)

myapp/views.py:

def home(request):
    raise Exception('arg')


Reply all
Reply to author
Forward
0 new messages