Просмотр исходного кода

Document the new post_clean signal

jeremystretch 4 лет назад
Родитель
Сommit
dfd42c9896
2 измененных файлов с 12 добавлено и 0 удалено
  1. 11 0
      docs/development/signals.md
  2. 1 0
      mkdocs.yml

+ 11 - 0
docs/development/signals.md

@@ -0,0 +1,11 @@
+# Signals
+
+In addition to [Django's built-in signals](https://docs.djangoproject.com/en/stable/topics/signals/), NetBox defines some of its own, listed below.
+
+## post_clean
+
+This signal is sent by models which inherit from `CustomValidationMixin` at the end of their `clean()` method.
+
+### Receivers
+
+* `extras.signals.run_custom_validators()`

+ 1 - 0
mkdocs.yml

@@ -90,6 +90,7 @@ nav:
         - Style Guide: 'development/style-guide.md'
         - Models: 'development/models.md'
         - Extending Models: 'development/extending-models.md'
+        - Signals: 'development/signals.md'
         - Application Registry: 'development/application-registry.md'
         - User Preferences: 'development/user-preferences.md'
         - Release Checklist: 'development/release-checklist.md'