mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Simplified AppConfig.import_models().
Since AppConfig now has a reference to its parent Apps registry, it can look up the models there instead of receiving them in argument.
This commit is contained in:
committed by
Tim Graham
parent
efcb7e1ebf
commit
fd748c42a9
@@ -214,8 +214,8 @@ class AppConfigStub(AppConfig):
|
||||
# the app name, but we need something unique, and the label works fine.
|
||||
super(AppConfigStub, self).__init__(label, None)
|
||||
|
||||
def import_models(self, all_models):
|
||||
self.models = all_models
|
||||
def import_models(self):
|
||||
self.models = self.apps.all_models[self.label]
|
||||
|
||||
|
||||
class StateApps(Apps):
|
||||
|
||||
Reference in New Issue
Block a user