Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
env:
SECRET_KEY: ${{ secrets.DJANGO_SECRET_KEY }}
run: |
python manage.py test
15 changes: 9 additions & 6 deletions mysite/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
import os
from pathlib import Path
import dj_database_url
from dotenv import load_dotenv

load_dotenv()

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
Expand All @@ -21,7 +24,7 @@
# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY')
SECRET_KEY = os.getenv('DJANGO_SECRET_KEY')

IS_HEROKU_APP = "DYNO" in os.environ and not "CI" in os.environ

Expand All @@ -35,7 +38,7 @@
# to list the expected hostnames explicitly to prevent HTTP Host header attacks. See:
# https://docs.djangoproject.com/en/5.0/ref/settings/#std-setting-ALLOWED_HOSTS

ALLOWED_HOSTS = ['localhost', '127.0.0.1', 'environment-whistle-blower-9801f3048520.herokuapp.com']
ALLOWED_HOSTS = ['localhost', '127.0.0.1', 'ecoguardian-4b38dddc468c.herokuapp.com']


# Application definition
Expand Down Expand Up @@ -136,7 +139,7 @@
}
}

SITE_ID = 1
SITE_ID = 4

LOGIN_REDIRECT_URL = '/'
LOGOUT_REDIRECT_URL = '/'
Expand Down Expand Up @@ -172,9 +175,9 @@
USE_TZ = True

#AWS S3 Settings
AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID')
AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY')
AWS_STORAGE_BUCKET_NAME = os.environ.get('AWS_STORAGE_BUCKET_NAME')
AWS_ACCESS_KEY_ID = os.getenv('AWS_ACCESS_KEY_ID')
AWS_SECRET_ACCESS_KEY = os.getenv('AWS_SECRET_ACCESS_KEY')
AWS_STORAGE_BUCKET_NAME = os.getenv('AWS_STORAGE_BUCKET_NAME')
AWS_S3_CUSTOM_DOMAIN = '%s.s3.amazonaws.com' % AWS_STORAGE_BUCKET_NAME
AWS_S3_FILE_OVERWRITE = False

Expand Down
Binary file modified requirements.txt
Binary file not shown.