I am unable to run python script inside my django project.
- I have create a directory with
mkdir scripts
- Then I use
touch scripts/__init__.py
- Then I create my python script using
touch scripts/update_keyword.py
- here is the code of my script
def run():
# Fetch all questions
print("run script")
Then I run my script with the help of the following command:
python manage.py runscript update_keyword.py
Now I am getting following error:
Unknown command: 'runscript'
Type 'manage.py help' for usage.
I have follow this blog https://django-extensions.readthedocs.io/en/latest/runscript.html . Kindly Help.