signals: Document the weird unused import for signal registration.

This commit is contained in:
Tim Abbott 2019-02-02 23:02:55 -08:00
parent c2cb804ebe
commit f34a5d6828
1 changed files with 5 additions and 0 deletions

View File

@ -16,6 +16,11 @@ class ZerverConfig(AppConfig):
name = "zerver" # type: str
def ready(self) -> None:
# We import zerver.signals here for the side effect of
# registering the user_logged_in signal receiver. This import
# needs to be here (rather than e.g. at top-of-file) to avoid
# running that code too early in Django's setup process, but
# in any case, this is an intentionally unused import.
import zerver.signals
if settings.POST_MIGRATION_CACHE_FLUSHING: