Skip to content
Snippets Groups Projects
Verified Commit 8bd1b47e authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Add general signal interface for default data maintenance

This change is primarily intended to allow models to declare their own
default data, without having to use data migrations. Data migrations
have the downside of being run only once, so e.g. `manage.py flush` will
delete default data wchich will never be restored. Also, I consider it
more natural todefine default data setup on model classes.

In order to achieve that, this adds a generic interface for apps to
register hooks called on several signals, by simply implementing methods
with the same name on their AppConfig instance.
parent 3da5e898
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment