|Reported by:||aaugustin||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
There are two highly dubious things in the current implementation of the app registry (which date back to a refactoring by Malcolm 7 years ago):
1) The "postponing" behavior which is designed to avoid circular imports when populate_models() is triggered during the import of a models module. Depending on the implementation of #21676, that may become unnecessary. ptone once suggested that #18251 removed the need for this behavior, but I'm not sure why.
2) The three uses of get_registered_model. It looks like it's optional. But ModelBase.new is scary...