mirror of
https://github.com/django/django.git
synced 2025-07-21 01:59:26 +00:00
[3.0.x] Clarified AppConfig.ready() docs example.
Backport of 971a84d6af9de738be2a7a8344fa8c80671d1729 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…
x
Reference in New Issue
Block a user