This PR is intended to better communicate to users of Django-Flags various expectations and assumptions that get made but that aren't always obvious (even to me). These include:
That feature flag state can't be checked before the app registry is ready
That flag state can't be checked at import-time of modules that Django loads when starting up (like urls.py)
FlaggedViewMixin now constructs its decorated view at as_view() call time rather than at request time. This should ensure that any errors are reported at start-up rather than in a request cycle.
Fallback functions that do not take the same arguments as their corresponding flagged functions will now raise a RuntimeWarning. Along with #38, this closes #37.
This PR is intended to better communicate to users of Django-Flags various expectations and assumptions that get made but that aren't always obvious (even to me). These include:
as_view()
call time rather than at request time. This should ensure that any errors are reported at start-up rather than in a request cycle.RuntimeWarning
. Along with #38, this closes #37.