diff --git a/config/settings.py b/config/settings.py index d906642..b50255f 100644 --- a/config/settings.py +++ b/config/settings.py @@ -199,4 +199,20 @@ LOGOUT_REDIRECT_URL = 'login' from django.contrib.messages import constants as message_constants MESSAGE_TAGS = { message_constants.ERROR: 'danger', -} \ No newline at end of file +} + +# === LOCAL DEVELOPMENT: SQLite override === +# Set USE_SQLITE=true in environment to use SQLite instead of MariaDB. +# This lets you test locally without a MySQL/MariaDB server. +if os.getenv('USE_SQLITE', 'false').lower() == 'true': + DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } + } + # Disable secure cookies for local http:// testing + SESSION_COOKIE_SECURE = False + CSRF_COOKIE_SECURE = False + SESSION_COOKIE_SAMESITE = 'Lax' + CSRF_COOKIE_SAMESITE = 'Lax' \ No newline at end of file diff --git a/core/templates/core/work_history.html b/core/templates/core/work_history.html index 765b19c..f647e28 100644 --- a/core/templates/core/work_history.html +++ b/core/templates/core/work_history.html @@ -40,9 +40,9 @@ {# === FILTER BAR === #} -