Opened 16 years ago
Closed 14 years ago
#11192 closed (fixed)
ModelForms development error messages
Reported by: | Anton Kolechkin | Owned by: | Anton Kolechkin |
---|---|---|---|
Component: | Forms | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Design decision needed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
from django.forms import ModelForm class TrustForm(ModelForm): class Meta: pass # forgotten model attribute here
If Meta in formclass has no model attribute it raises exception like this:
TypeError at /exampleurl/ 'NoneType' object is not callable.
I guess my patch makes more informative exception messages. ValueError and TypeError may be wrong here, may be use AssertError instead, don't know.
Attachments (1)
Change History (7)
by , 16 years ago
Attachment: | ModelForms_checks.patch added |
---|
comment:1 by , 16 years ago
comment:2 by , 16 years ago
milestone: | 1.1 |
---|
Please don't put things in the 1.1 milestone unless they are critical bugs. A perhaps non-ideal error message does not fit into that category.
comment:3 by , 16 years ago
Has patch: | set |
---|
Sorry, didn't known milestone stuff. (it is my first ticket and patch)
comment:4 by , 15 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:6 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I can't reproduce this with 1.1 or 1.2.
There is patch for form/models.py