For testing purposes, I'm writing a custom manager to reset the whole database, and repopulate certain tables with default fields. At the moment, I do this by calling mange.py flush, followed by manage.py loaddata, followed by the custom manager (that does some fancier stuff). I'd like to bring those all inside a single custom manager.
Is there a way to call generic managers (e.g. flush, loaddata) from my custom manager?
are you talking about management commands? (different to managers)
something like
from django.core.management import call_command
call_command('loaddata', 'myapp')