diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/releases/1.8.txt | 5 | ||||
| -rw-r--r-- | docs/topics/checks.txt | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt index dda798f0a2..d5281243be 100644 --- a/docs/releases/1.8.txt +++ b/docs/releases/1.8.txt @@ -364,6 +364,11 @@ Signals the request, was added to the :data:`~django.core.signals.request_started` signal. +System Check Framework +^^^^^^^^^^^^^^^^^^^^^^ + +* :attr:`~django.core.checks.register` can now be used as a function. + Templates ^^^^^^^^^ diff --git a/docs/topics/checks.txt b/docs/topics/checks.txt index 55181688b3..b40b06f137 100644 --- a/docs/topics/checks.txt +++ b/docs/topics/checks.txt @@ -151,6 +151,20 @@ settings file like this:: These checks will only be run if the :djadminopt:`--deploy` option is passed to the :djadmin:`check` command. +You can also use ``register`` as a function rather than a decorator by +passing a callable object (usually a function) as the first argument +to ``register``. + +The code below is equivalent to the code above:: + + def my_check(app_configs, **kwargs): + ... + register(my_check, Tags.security, deploy=True) + +.. versionchanged:: 1.8 + + The ability to use register as a function was added. + .. _field-checking: Field, Model, and Manager checks |
