You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.
DATABASE_ROUTERS = ['django_model_deprecater.routers.DeprecatedModelRouter']
DEPRECATED_MODEL_ROUTER = {
# Whether to allow migrate if model deprecated
'check_allow_migrate': False,
# Whether to allow relations if a model in the auth app is involved
'check_allow_relation': False,
'models': {},
}
It might be better to handle the model collection via a decorator, then once collected those models can be handed to the router.
To preserve the per environment capability of using settings, there should be some environment to warning or exception mapping.
Using a decorator might also serve as an entrypoint to detect pure python usages of the model and raise the warning or error as well.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Instead of doing
It might be better to handle the model collection via a decorator, then once collected those models can be handed to the router.
To preserve the per environment capability of using settings, there should be some environment to warning or exception mapping.
Using a decorator might also serve as an entrypoint to detect pure python usages of the model and raise the warning or error as well.
The text was updated successfully, but these errors were encountered: