mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06:08 +00:00
Renamed AppConfig.setup to ready.
Thanks Jannis and Marc for the feedback. Fixed #21717.
This commit is contained in:
@@ -159,7 +159,7 @@ class AppConfig(object):
|
||||
models_module_name = '%s.%s' % (self.name, MODELS_MODULE_NAME)
|
||||
self.models_module = import_module(models_module_name)
|
||||
|
||||
def setup(self):
|
||||
def ready(self):
|
||||
"""
|
||||
Override this method in subclasses to run setup code.
|
||||
Override this method in subclasses to run code when Django starts.
|
||||
"""
|
||||
|
||||
@@ -105,7 +105,7 @@ class Apps(object):
|
||||
self.ready = True
|
||||
|
||||
for app_config in self.get_app_configs():
|
||||
app_config.setup()
|
||||
app_config.ready()
|
||||
|
||||
def check_ready(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user