Albert Albert - 1 year ago 65
Python Question

Run a script which is in a django app under management folder in command folder

I have a django project and inside I have an app. Inside this app I created a management folder, inside this one I create a commands folder, and inside the last one I put my script with the file too. My question is how I can run the script, because if I'm in the django project folder (where is file) and I execute the line:


the terminal is displaying this:

Unknown command: ''

Art Art
Answer Source

It should be python myscript, and if everything else is correct it will work.

Note that management command is not just a python script. It must implement class Command inside. (Tutorial)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download