IS_PRODUCTION = False or True
DJANGO_SECRET_KEY = "<secret key>"
POSTGRES__PASS = "<postgres password>"
POSTGRES__PORT = "<postgres port>"
The .yapenv
contain environment variables that will be loaded on startup.
ALLOWED_HOSTS = example.com,192.168.1.123
CSRF_TRUSTED_ORIGINS = https://example.com
CORS_ORIGIN_WHITELIST = https://example.com
You can setup a PostgreSQL server using their installer.
Then create a database in the postgres server called dataViz
.
python manage.py makemigrations
python manage.py migrate
python manage.py runserver
If you're going to change the typescript code or the html templates and need to recompile typescript or tailwind:
cd node
pnpm i
The script will be watching for changes and continuously recompile, interrupt it using Ctrl+C.
pnpm build
When adding new scripts, you can add a new standalone script if you put it directly in the src directory. This script will have to be manually added to base.html.
Scripts can also be imported in other script files, this way they will all be bundled into one big script. See main.ts for reference.