diff --git a/sherlock_rest_service/manage.py b/manage.py old mode 100755 new mode 100644 similarity index 100% rename from sherlock_rest_service/manage.py rename to manage.py diff --git a/requirements.txt b/requirements.txt index 7b3f91a..47b115f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,6 +10,7 @@ openpyxl<=3.1.2 exrex>=0.11.0 # New for this project +python-dotenv-1.0.0 Django>=3.2.10 djangorestframework>=3.13.0 gunicorn==20.1.0 diff --git a/sherlock_rest_service/sherlock_api/__init__.py b/sherlock_api/__init__.py similarity index 100% rename from sherlock_rest_service/sherlock_api/__init__.py rename to sherlock_api/__init__.py diff --git a/sherlock_rest_service/sherlock_api/admin.py b/sherlock_api/admin.py similarity index 100% rename from sherlock_rest_service/sherlock_api/admin.py rename to sherlock_api/admin.py diff --git a/sherlock_rest_service/sherlock_api/apps.py b/sherlock_api/apps.py similarity index 100% rename from sherlock_rest_service/sherlock_api/apps.py rename to sherlock_api/apps.py diff --git a/sherlock_rest_service/sherlock_api/migrations/__init__.py b/sherlock_api/migrations/__init__.py similarity index 100% rename from sherlock_rest_service/sherlock_api/migrations/__init__.py rename to sherlock_api/migrations/__init__.py diff --git a/sherlock_rest_service/sherlock_api/models.py b/sherlock_api/models.py similarity index 100% rename from sherlock_rest_service/sherlock_api/models.py rename to sherlock_api/models.py diff --git a/sherlock_rest_service/sherlock_api/tests.py b/sherlock_api/tests.py similarity index 100% rename from sherlock_rest_service/sherlock_api/tests.py rename to sherlock_api/tests.py diff --git a/sherlock_rest_service/sherlock_api/urls.py b/sherlock_api/urls.py similarity index 100% rename from sherlock_rest_service/sherlock_api/urls.py rename to sherlock_api/urls.py diff --git a/sherlock_rest_service/sherlock_api/views.py b/sherlock_api/views.py similarity index 100% rename from sherlock_rest_service/sherlock_api/views.py rename to sherlock_api/views.py diff --git a/sherlock_rest_service/sherlock_rest_service/__init__.py b/sherlock_rest_service/__init__.py similarity index 100% rename from sherlock_rest_service/sherlock_rest_service/__init__.py rename to sherlock_rest_service/__init__.py diff --git a/sherlock_rest_service/sherlock_rest_service/asgi.py b/sherlock_rest_service/asgi.py similarity index 100% rename from sherlock_rest_service/sherlock_rest_service/asgi.py rename to sherlock_rest_service/asgi.py diff --git a/sherlock_rest_service/sherlock_rest_service/settings.py b/sherlock_rest_service/settings.py similarity index 86% rename from sherlock_rest_service/sherlock_rest_service/settings.py rename to sherlock_rest_service/settings.py index 14b93ea..87e25c2 100644 --- a/sherlock_rest_service/sherlock_rest_service/settings.py +++ b/sherlock_rest_service/settings.py @@ -13,31 +13,36 @@ from pathlib import Path import os + +from dotenv import load_dotenv + +load_dotenv() + # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent -SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY') +SECRET_KEY = os.environ.get("DJANGO_SECRET_KEY") if not SECRET_KEY: raise ValueError("DJANGO_SECRET_KEY environment variable is not set.") # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = os.environ.get('DJANGO_DEBUG', 'False').lower() == 'true' +DEBUG = os.environ.get("DJANGO_DEBUG", "False").lower() == "true" # https://docs.djangoproject.com/en/3.0/ref/settings/#allowed-hosts ALLOWED_HOSTS = [] -RENDER_EXTERNAL_HOSTNAME = os.environ.get('RENDER_EXTERNAL_HOSTNAME') +RENDER_EXTERNAL_HOSTNAME = os.environ.get("RENDER_EXTERNAL_HOSTNAME") if RENDER_EXTERNAL_HOSTNAME: ALLOWED_HOSTS.append(RENDER_EXTERNAL_HOSTNAME) # Application definition INSTALLED_APPS = [ -# "django.contrib.admin", -# "django.contrib.auth", -# "django.contrib.contenttypes", -# "django.contrib.sessions", + # "django.contrib.admin", + # "django.contrib.auth", + # "django.contrib.contenttypes", + # "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", "sherlock_api", @@ -49,7 +54,7 @@ "django.contrib.sessions.middleware.SessionMiddleware", "django.middleware.common.CommonMiddleware", "django.middleware.csrf.CsrfViewMiddleware", -# "django.contrib.auth.middleware.AuthenticationMiddleware", + # "django.contrib.auth.middleware.AuthenticationMiddleware", "django.contrib.messages.middleware.MessageMiddleware", "django.middleware.clickjacking.XFrameOptionsMiddleware", ] @@ -78,12 +83,12 @@ # Database # https://docs.djangoproject.com/en/4.1/ref/settings/#databases -#DATABASES = { +# DATABASES = { # "default": { # "ENGINE": "django.db.backends.sqlite3", # "NAME": BASE_DIR / "db.sqlite3", # } -#} +# } # Password validation diff --git a/sherlock_rest_service/sherlock b/sherlock_rest_service/sherlock deleted file mode 120000 index 9a14ab8..0000000 --- a/sherlock_rest_service/sherlock +++ /dev/null @@ -1 +0,0 @@ -../sherlock \ No newline at end of file diff --git a/sherlock_rest_service/sherlock_rest_service/urls.py b/sherlock_rest_service/urls.py similarity index 100% rename from sherlock_rest_service/sherlock_rest_service/urls.py rename to sherlock_rest_service/urls.py diff --git a/sherlock_rest_service/sherlock_rest_service/wsgi.py b/sherlock_rest_service/wsgi.py similarity index 100% rename from sherlock_rest_service/sherlock_rest_service/wsgi.py rename to sherlock_rest_service/wsgi.py