summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authoraverybigant <averybigant@gmail.com>2014-11-05 14:01:49 +0800
committerTim Graham <timograham@gmail.com>2014-11-11 16:29:32 +0100
commitb7a5b6ab8672daf907ba57e50edbed4cad596d4b (patch)
treeabd0bf721e3ea3df856aa8a358c96d69787177b4 /docs
parentb3fd39f7c8921b314f12dd53ee65740464d4a5f1 (diff)
Fixed #23750 -- Allowed core.checks.register to be used as a function
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/1.8.txt5
-rw-r--r--docs/topics/checks.txt14
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