diff --git a/userausfall/settings.py b/userausfall/settings.py index c96f589..eeed203 100644 --- a/userausfall/settings.py +++ b/userausfall/settings.py @@ -2,24 +2,25 @@ Django settings for userausfall. For more information on this file, see -https://docs.djangoproject.com/en/2.2/topics/settings/ +https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see -https://docs.djangoproject.com/en/2.2/ref/settings/ +https://docs.djangoproject.com/en/3.2/ref/settings/ """ import os +from pathlib import Path -# Build paths inside the project like this: os.path.join(BASE_DIR, ...) -BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -DATA_DIR = os.environ.get("USERAUSFALL_DATA_DIR", BASE_DIR) +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve().parent.parent +DATA_DIR = Path(os.environ.get("USERAUSFALL_DATA_DIR", BASE_DIR)) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = os.environ.get("LOCAL_DJANGO_SECRET_KEY") +SECRET_KEY = "django-insecure-ngy2599=i5c*5(*bw%gbs&jzb(^p-4zk&6!a8a76tevv$tb9xq" # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True @@ -83,6 +84,12 @@ DATABASES = { } +# Default primary key field type +# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" + + # User model #