Skip to content

Commit

Permalink
change django file
Browse files Browse the repository at this point in the history
  • Loading branch information
Reeya123 committed Jul 23, 2024
1 parent 76e5a17 commit f6852da
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,20 @@ jobs:
run: |
cd server # Change to the subdirectory
python3.9 manage.py test
env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
DJANGO_GOOGLE_OAUTH2_CLIENT_ID: ${{ secrets.DJANGO_GOOGLE_OAUTH2_CLIENT_ID }}
DJANGO_GOOGLE_OAUTH2_CLIENT_SECRET: ${{ secrets.DJANGO_GOOGLE_OAUTH2_CLIENT_SECRET }}
DJANGO_ORCID_OAUTH2_CLIENT_URL: ${{ secrets.DJANGO_ORCID_OAUTH2_CLIENT_URL }}
DJANGO_ORCID_OAUTH2_CLIENT_ID: ${{ secrets.DJANGO_ORCID_OAUTH2_CLIENT_ID }}
DJANGO_ORCID_OAUTH2_CLIENT_SECRET: ${{ secrets.DJANGO_ORCID_OAUTH2_CLIENT_SECRET }}
DJANGO_ORCID_OAUTH2_URL: ${{ secrets.DJANGO_ORCID_OAUTH2_URL }}
SERVER_VERSION: ${{ secrets.SERVER_VERSION }}
SERVER_URL: ${{ secrets.SERVER_URL }}
DATABASE: ${{ secrets.DATABASE }}
EMAIL_BACKEND: ${{ secrets.EMAIL_BACKEND }}

- name: Clean up
run: |
rm server/.env
3 changes: 3 additions & 0 deletions server/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
from datetime import timedelta
import configparser
from django.core.management.utils import get_random_secret_key
from dotenv import load_dotenv

# Load environment variables from .env file
load_dotenv()
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

Expand Down
1 change: 1 addition & 0 deletions server/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ typing_extensions==4.5.0
tzdata==2023.3
uritemplate==4.1.1
urllib3==1.26.1
python-dotenv

0 comments on commit f6852da

Please sign in to comment.