Make plugin dependencies optional by allowing plugins to report errors

This commit is contained in:
Raphael Michel
2015-04-19 17:35:42 +02:00
parent cd0986606c
commit d17bf6a874
10 changed files with 70 additions and 8 deletions

View File

@@ -74,6 +74,13 @@ A working example would be::
default_app_config = 'pretix.plugins.timerestriction.TimeRestrictionApp'
The ``AppConfig`` class may implement a property ``compatiblity_errors``, that checks
whether the pretix installation meets all requirements of the plugin. If so,
it should contian ``None`` or an empty list, otherwise a list of strings containing
human-readable error messages. We recommend using the ``django.utils.functional.cached_property``
decorator, as it might get called a lot. You can also implement ``compatibility_warnings``,
those will be displayed but not block the plugin execution.
Signals
-------