summaryrefslogtreecommitdiffstats
path: root/manage.py
blob: ac36e2ebb18af59b3b742c1b6432b5e7bcd3e0d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python
# /// script
# requires-python = ">=3.13"
# dependencies = [
#     "bs4",
#     "cryptography",
#     "django",
#     "piexif",
#     "pillow",
#     "unidecode",
# ]
# ///
import os
import sys

"""This file is the route to run the standard Django utilities on the command line.
These are the most useful for troggle:

python manage.py test            --  runs the troggle test suite
python manage.py test -v 3       --  runs the troggle test suite with more detailed output
python -Wall manage.py check     --  runs the python package deprecation warnings
python manage.py makemigrations  --  creates django db migrations files
python manage.py inspectdb       --  creates datamodel documentaiton as python file  
python manage.py check -v 3 --deploy           --  runs the django system security warnings
python manage.py runserver  0.0.0.0:3777 -v 3  --  runs troggle SQLite webserver on port 3777
python manage.py diffsettings | grep "###"     --  lists what is non-standard django in the settings
"""

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)