[3.0.x] Clarified AppConfig.ready() docs example.
Backport of 971a84d6af
from master
This commit is contained in:
parent
a56e45a2bf
commit
ef22cf41af
|
@ -256,8 +256,13 @@ Methods
|
||||||
|
|
||||||
Example::
|
Example::
|
||||||
|
|
||||||
|
from django.apps import AppConfig
|
||||||
from django.db.models.signals import pre_save
|
from django.db.models.signals import pre_save
|
||||||
|
|
||||||
|
|
||||||
|
class RockNRollConfig(AppConfig):
|
||||||
|
# ...
|
||||||
|
|
||||||
def ready(self):
|
def ready(self):
|
||||||
# importing model classes
|
# importing model classes
|
||||||
from .models import MyModel # or...
|
from .models import MyModel # or...
|
||||||
|
|
Loading…
Reference in New Issue