looking at the source, it seems the no-initial-data
option is stored in an option variable called load_initial_data
so i think you need
call_command('flush', interactive=False, load_initial_data=False)
Question
In Django, I would like to do this the call_command
equivalent to
manage.py flush --no-initial-data
Something like
call_command('flush', interactive = False, initial_data = False)
but initial_data
and no_initial_data
are not the correct keyword (they do nothing).
Sorry for the trivial question, but I can't find any documentation for these options.
Solution
looking at the source, it seems the no-initial-data
option is stored in an option variable called load_initial_data
so i think you need
call_command('flush', interactive=False, load_initial_data=False)