Skip to content

Technical: Creating Running a Python Django Script from Shell

Ethan-Strominger edited this page Feb 20, 2024 · 2 revisions
  • Create script in kb/scripts. Do not use conditional statement if __name__ = "main". The Django runscript command does not use name.
  • Execute this command:
python manage.py runscript kb.scripts.<script_name>

Script name does not include the "py" extension. For example: python manage.py runscript doit"

Clone this wiki locally