I need to run a Custom Django Management Command (module named populate_db.py) included in a management/commands directory. It populates a database.
restaurant/
__init__.py
models.py
management/
commands/
_private.py
populate_db.py
tests.py
views.py
formDict.py
I want the command to take a mandatory argument as a dictionary. The mentioned dictionary can be obtained from the execution of another program named formDict.py
So I want a one-line command which will run formDict.py and consecutively take its result as an argument for my Custom Django Management Command python manage.py populate_db
.
Is it possible to form such a command at all? If not, how to implement the idea alternatively?