class CoolWidget(AdminTextareaWidget): def render(self, name, value, attrs={}): WRONG() return super(JsonSchemaWidget, self).render(name, value, attrs)
class PizzaForm(forms.ModelForm): class Meta: model = Pizza exclude = [] widgets = {'toppings': CoolWidget}
class PizzaAdmin(ModelAdmin): form = TemplateForm
NameError: name 'WRONG' is not defined
Now suppose that the condition that raises the exception happens only on a remote server
which has DEBUG=False. The exception happens because the configuration of a django project
has not been updated correctly yet.
Instead of failing loud, it will fail silently, leaving an empty add/change form.
Is it the intended behaviour? Or a bug?
I guess it is related due to the fact that template errors are silenced.