|
@@ -20,7 +20,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|
|
# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
|
|
|
|
|
|
# SECURITY WARNING: keep the secret key used in production secret!
|
|
|
-SECRET_KEY = 'l2-2d4dmvb0un0s)=5z%c87t*tg_hu&bt6*o^ks9r7f-3(mp$$'
|
|
|
+SECRET_KEY = "l2-2d4dmvb0un0s)=5z%c87t*tg_hu&bt6*o^ks9r7f-3(mp$$"
|
|
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
|
DEBUG = True
|
|
@@ -31,52 +31,54 @@ ALLOWED_HOSTS = []
|
|
|
# Application definition
|
|
|
|
|
|
INSTALLED_APPS = [
|
|
|
- 'django.contrib.admin',
|
|
|
- 'django.contrib.auth',
|
|
|
- 'django.contrib.contenttypes',
|
|
|
- 'django.contrib.sessions',
|
|
|
- 'django.contrib.messages',
|
|
|
- 'django.contrib.staticfiles',
|
|
|
+ "django.contrib.admin",
|
|
|
+ "django.contrib.auth",
|
|
|
+ "django.contrib.contenttypes",
|
|
|
+ "django.contrib.sessions",
|
|
|
+ "django.contrib.messages",
|
|
|
+ "django.contrib.staticfiles",
|
|
|
+ "django_extensions",
|
|
|
+ "games",
|
|
|
]
|
|
|
|
|
|
MIDDLEWARE = [
|
|
|
- 'django.middleware.security.SecurityMiddleware',
|
|
|
- 'django.contrib.sessions.middleware.SessionMiddleware',
|
|
|
- 'django.middleware.common.CommonMiddleware',
|
|
|
- 'django.middleware.csrf.CsrfViewMiddleware',
|
|
|
- 'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
|
- 'django.contrib.messages.middleware.MessageMiddleware',
|
|
|
- 'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
|
+ "django.middleware.security.SecurityMiddleware",
|
|
|
+ "django.contrib.sessions.middleware.SessionMiddleware",
|
|
|
+ "django.middleware.common.CommonMiddleware",
|
|
|
+ "django.middleware.csrf.CsrfViewMiddleware",
|
|
|
+ "django.contrib.auth.middleware.AuthenticationMiddleware",
|
|
|
+ "django.contrib.messages.middleware.MessageMiddleware",
|
|
|
+ "django.middleware.clickjacking.XFrameOptionsMiddleware",
|
|
|
]
|
|
|
|
|
|
-ROOT_URLCONF = 'emus.urls'
|
|
|
+ROOT_URLCONF = "emus.urls"
|
|
|
|
|
|
TEMPLATES = [
|
|
|
{
|
|
|
- 'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
|
- 'DIRS': [],
|
|
|
- 'APP_DIRS': True,
|
|
|
- 'OPTIONS': {
|
|
|
- 'context_processors': [
|
|
|
- 'django.template.context_processors.debug',
|
|
|
- 'django.template.context_processors.request',
|
|
|
- 'django.contrib.auth.context_processors.auth',
|
|
|
- 'django.contrib.messages.context_processors.messages',
|
|
|
+ "BACKEND": "django.template.backends.django.DjangoTemplates",
|
|
|
+ "DIRS": [str(BASE_DIR.joinpath("templates"))], # new
|
|
|
+ "APP_DIRS": True,
|
|
|
+ "OPTIONS": {
|
|
|
+ "context_processors": [
|
|
|
+ "django.template.context_processors.debug",
|
|
|
+ "django.template.context_processors.request",
|
|
|
+ "django.contrib.auth.context_processors.auth",
|
|
|
+ "django.contrib.messages.context_processors.messages",
|
|
|
],
|
|
|
},
|
|
|
},
|
|
|
]
|
|
|
|
|
|
-WSGI_APPLICATION = 'emus.wsgi.application'
|
|
|
+WSGI_APPLICATION = "emus.wsgi.application"
|
|
|
|
|
|
|
|
|
# Database
|
|
|
# https://docs.djangoproject.com/en/3.1/ref/settings/#databases
|
|
|
|
|
|
DATABASES = {
|
|
|
- 'default': {
|
|
|
- 'ENGINE': 'django.db.backends.sqlite3',
|
|
|
- 'NAME': BASE_DIR / 'db.sqlite3',
|
|
|
+ "default": {
|
|
|
+ "ENGINE": "django.db.backends.sqlite3",
|
|
|
+ "NAME": BASE_DIR / "db.sqlite3",
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -86,16 +88,16 @@ DATABASES = {
|
|
|
|
|
|
AUTH_PASSWORD_VALIDATORS = [
|
|
|
{
|
|
|
- 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
|
|
+ "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
|
|
|
},
|
|
|
{
|
|
|
- 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
|
|
+ "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
|
|
|
},
|
|
|
{
|
|
|
- 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
|
|
+ "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
|
|
|
},
|
|
|
{
|
|
|
- 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
|
|
+ "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
|
|
|
},
|
|
|
]
|
|
|
|
|
@@ -103,9 +105,9 @@ AUTH_PASSWORD_VALIDATORS = [
|
|
|
# Internationalization
|
|
|
# https://docs.djangoproject.com/en/3.1/topics/i18n/
|
|
|
|
|
|
-LANGUAGE_CODE = 'en-us'
|
|
|
+LANGUAGE_CODE = "en-us"
|
|
|
|
|
|
-TIME_ZONE = 'UTC'
|
|
|
+TIME_ZONE = "UTC"
|
|
|
|
|
|
USE_I18N = True
|
|
|
|
|
@@ -117,4 +119,6 @@ USE_TZ = True
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
|
# https://docs.djangoproject.com/en/3.1/howto/static-files/
|
|
|
|
|
|
-STATIC_URL = '/static/'
|
|
|
+STATIC_URL = "/static/"
|
|
|
+MEDIA_URL = "/media/"
|
|
|
+MEDIA_ROOT = "/home/powellc/RetroPie/roms"
|