fixing sqlite

This commit is contained in:
2024-08-28 13:41:19 +02:00
parent 0f86a8ae69
commit 1e16059580
7 changed files with 15 additions and 9 deletions

View File

@@ -0,0 +1,8 @@
import os
from django.core.exceptions import ImproperlyConfigured
def get_env_variable(var_name):
try:
return os.environ[var_name]
except KeyError:
raise ImproperlyConfigured(f"Set the {var_name} environment variable")

View File

@@ -1,9 +1,12 @@
from .base import *
from .getenv import get_env_variable
DEBUG = False
ALLOWED_HOSTS = ['18.196.202.28']
SECRET_KEY = get_env_variable('SECRET_KEY')
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',