From 4b65f134fe7c5b5b695be546c18d2c12d47382a6 Mon Sep 17 00:00:00 2001 From: Rens Houben Date: Mon, 25 Aug 2025 17:59:56 +0200 Subject: [PATCH] Style fixes --- src/config/settings.py | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/src/config/settings.py b/src/config/settings.py index 2dfbd62..4ac02c1 100644 --- a/src/config/settings.py +++ b/src/config/settings.py @@ -14,8 +14,6 @@ import os from pathlib import Path from dotenv import load_dotenv - -# Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent load_dotenv(BASE_DIR / ".env") @@ -26,9 +24,6 @@ ALLOWED_HOSTS = os.environ.get( "DJANGO_ALLOWED_HOSTS", default="localhost 127.0.0.1 0.0.0.0" ).split() - -# Application definition - INSTALLED_APPS = [ "django.contrib.admin", "django.contrib.auth", @@ -69,10 +64,11 @@ WSGI_APPLICATION = "config.wsgi.application" DB_ENGINE=os.environ.get('DB_ENGINE', default='sqlite3') DEFAULT_DB = { - 'ENGINE': 'django.db.backends.%s' % DB_ENGINE, + 'ENGINE': f"django.db.backends.{DB_ENGINE}", } if DB_ENGINE=='sqlite3': - DEFAULT_DB['NAME'] = os.path.join('BASE_DIR', os.environ.get('DB_NAME', default='urania.sqlite3')) + DEFAULT_DB['NAME'] = os.path.join('BASE_DIR', + os.environ.get('DB_NAME', default='urania.sqlite3')) else: DEFAULT_DB['NAME'] = os.environ.get('DB_NAME') DEFAULT_DB['USER'] = os.environ.get('DB_USER') @@ -87,9 +83,6 @@ DATABASES = { 'default': DEFAULT_DB, } -# Password validation -# https://docs.djangoproject.com/en/5.2/ref/settings/#auth-password-validators - AUTH_PASSWORD_VALIDATORS = [ { "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator", @@ -105,10 +98,6 @@ AUTH_PASSWORD_VALIDATORS = [ }, ] - -# Internationalization -# https://docs.djangoproject.com/en/5.2/topics/i18n/ - LANGUAGE_CODE = "en-us" TIME_ZONE = "UTC" @@ -117,13 +106,6 @@ USE_I18N = True USE_TZ = True - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/5.2/howto/static-files/ - STATIC_URL = "static/" -# Default primary key field type -# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field - DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"