﻿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
18418	Debug doesn't catch exception instead complains views does not exist	yeukhon	nobody	"Suppose we have this forms.py:

{{{
class SubmitButtonField(forms.Field):
     # here we write a custom field....

class Editor(forms.Form):
    script_name = forms.CharField(max_length=60, min_length=1)
    view_level = forms.ChoiceField(widget=forms.widgets.RadioSelect, choices=VIEW_LEVEL)
    text_box = forms.CharField(widget=forms.widgets.Textarea, required=False)
    save_button = forms.SubmitButtonField(required=False)

    # notice save_button above....
}}}

Notice that `save_button` has an error. I accidentally added `forms.` in the beginning. This is invalid, and Python will raise exception.

However, when we try to visit the page, it complains about `myapp.views.view_name` does not exist.
I fired up django shell, and when I `import myapp.views` I got this error:

{{{
AttributeError: 'module' object has no attribute 'SubmitButtonField'
}}}


Django debug page does not really catch this kind of exception. Is this a bug or an enactment-to-be-made? "	Bug	closed	Core (URLs)	1.4	Normal	fixed	debug		Accepted	0	0	0	0	0	0
