mirror of
https://github.com/django/django.git
synced 2025-09-27 04:29:17 +00:00
Clarified AppConfig.ready() docs example.
This commit is contained in:
parent
486a8dae2d
commit
971a84d6af
1 changed files with 11 additions and 6 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue