I’d like to call the equivalent of manage.py loaddata from a Django view. I’d like to be able to specify where to load the data from and which application to load it into.
Any ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Each
django-admin.py(manage.py) command, as seen in the documentation, you can call from your code with:Where first param is the command name, all other position params are the same as command line position params and all keyword params are options.