Refs #33163 -- Corrected example of connection signal handlers in AppConfig.ready().

This commit is contained in:
Mariusz Felisiak 2021-11-26 11:16:35 +01:00 committed by GitHub
parent 24b316536a
commit 75ee7057e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -142,6 +142,7 @@ Now, our ``my_callback`` function will be called each time a request finishes.
connect signal handlers::
from django.apps import AppConfig
from django.core.signals import request_finished
class MyAppConfig(AppConfig):
...
@ -150,7 +151,7 @@ Now, our ``my_callback`` function will be called each time a request finishes.
# Implicitly connect a signal handlers decorated with @receiver.
from . import signals
# Explicitly connect a signal handler.
signals.request_finished.connect(signals.my_callback)
request_finished.connect(signals.my_callback)
.. note::