Integrations that want to work with conditions can now do so by adding
one or more ConditionsField
s to their configuration form. These will
automatically be set up with the appropriate Local Site, ensuring that
any querysets contained within are LocalSite
-aware. The integration can
then match against those conditions when iterating through the list of
enabled configurations through a new config.match_conditions()
method.
This all makes it very easy for an integration to allow for
customization based on conditions, without being locked into a
pre-determined set of condition choices or use cases.