﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21345	Debug view calls callable settings	Aymeric Augustin	nobody	"'''Reproduction instructions:'''

1) Add this to your settings file (I'm not saying it's a good idea)

{{{
def KABOOM():
    raise ValueError(""KABOOM!"")
}}}

2) Create a view that raises an uncaught exception

3) Open the corresponding URL with DEBUG = True

'''Expected result:'''

Django's fancy debug page.

'''Actual result:'''

Non-descript error page: ""A server error occurred.  Please contact the administrator.""

----

Here the function defined in the settings raises an exception; in fact the problem is that Django's debug page will call any callable setting that accepts being called without arguments. I admit it's a lousy idea to have callable settings; Django favors paths to callables; but it's still a lame behavior to call them arbitrarily :)

This was originally reported against the Debug Toolbar: https://github.com/django-debug-toolbar/django-debug-toolbar/issues/252. I'm duplicating the issue here because the Debug Toolbar took that code from Django itself. I'll update it to follow Django's behavior."	Bug	closed	Core (Other)	dev	Normal	fixed		bmispelon@…	Ready for checkin	1	0	0	0	0	0
