admin.site.register() does not check if the model is abstract (gives weird error)
|Reported by:||Diederik van der Boor||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)
Changed 6 years ago by