I am trying to run a script using django's runscript. I followed everything in the documentation. Did i miss something?
But when i tried running it from the command line. it says unknown command 'runscript'
(env) C:\Users\MIS\hr system\hr_project>python manage.py runscript automail.py Unknown command: 'runscript'
You need to install django-extensions if you want the runscript
command. If you don't want to do that, you can:
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "your_project_name.settings")
from your_project.models import SomeModel
# Your code goes here...
manage.py
command. You can use the official how-to: https://docs.djangoproject.com/en/2.2/howto/custom-management-commands/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With