admin.site.register() does not check if the model is abstract (gives weird error)
|Reported by:||vdboor||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||yes||Patch needs improvement:||no|
When an abstract model is registered with admin.site.register() it produces the following error later on:
type object '...' has no attribute '_default_manager'
This error does not make much sense unless you're already have more intimate knowledge of the framework.
To ease the learning curve of new developers, I think it would make sense to check whether the model is abstract or not.
Change History (6)
comment:1 Changed 6 years ago by vdboor
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:2 Changed 6 years ago by rasca
- Triage Stage changed from Unreviewed to Accepted
- Version changed from 1.2 to SVN