keeping tidy

This commit is contained in:
stupidcomputer 2024-06-29 15:48:53 -05:00
parent 9a63464300
commit 97c0a22cf6
3 changed files with 6 additions and 4 deletions

View File

@ -24,5 +24,4 @@ services:
depends_on: depends_on:
- web - web
volumes: volumes:
static_volume: static_volume:
db_persist:

View File

@ -14,5 +14,4 @@ to_register = [
[models.LegislationClassification] [models.LegislationClassification]
] ]
for i in to_register: for i in to_register:
admin.site.register(*i) admin.site.register(*i)
print(i)

View File

@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/4.2/ref/settings/
""" """
import os import os
import random
from pathlib import Path from pathlib import Path
@ -18,6 +19,9 @@ from pathlib import Path
BASE_DIR = Path(__file__).resolve().parent.parent BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = os.environ.get("SECRET_KEY") SECRET_KEY = os.environ.get("SECRET_KEY")
if not SECRET_KEY:
print("[!!!] YOU'RE USING A RANDOM SECRET_KEY -- CHANGE THIS IF YOU'RE GOING INTO PROD")
SECRET_KEY = random.randint(1, 100000000000000)
DEBUG = bool(os.environ.get("DEBUG", default=0)) DEBUG = bool(os.environ.get("DEBUG", default=0))