Skip to content

Commit

Permalink
Fixing workflow (#1)
Browse files Browse the repository at this point in the history
* Fake production value to make settings work

* Added use of django-dotenv to ease the usage

* Fixing test
  • Loading branch information
adamspd authored Jan 17, 2024
1 parent c2379f6 commit 66f014f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 19 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ celerybeat.pid
*.sage.py

# Environments
.env
django_payment_manager/.env
.venv
env/
venv/
Expand Down Expand Up @@ -179,4 +179,3 @@ cython_debug/
.DS_Store
**/.DS_Store
**/**/.DS_Store
productions.py
11 changes: 6 additions & 5 deletions django_payment_manager/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
For the full list of settings and their values, see
https://docs.djangoproject.com/en/5.0/ref/settings/
"""

import os
from pathlib import Path
import dotenv

from django_payment_manager.productions import PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PAYPAL_ENVIRONMENT
dotenv.read_dotenv(override=True)

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
Expand Down Expand Up @@ -127,9 +128,9 @@

DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

PAYMENT_PAYPAL_ENVIRONMENT = PAYPAL_ENVIRONMENT
PAYMENT_PAYPAL_CLIENT_ID = PAYPAL_CLIENT_ID
PAYMENT_PAYPAL_CLIENT_SECRET = PAYPAL_CLIENT_SECRET
PAYMENT_PAYPAL_ENVIRONMENT = os.environ.get("PAYPAL_ENVIRONMENT", "sandbox")
PAYMENT_PAYPAL_CLIENT_ID = os.environ.get("PAYPAL_CLIENT_ID", "")
PAYMENT_PAYPAL_CLIENT_SECRET = os.environ.get("PAYPAL_CLIENT_SECRET", "")

PAYMENT_BASE_TEMPLATE = 'homepage/base.html'
PAYMENT_WEBSITE_NAME = 'CruelTouch' # or your website name
Expand Down
Empty file removed payment/tests/__init__.py
Empty file.
11 changes: 0 additions & 11 deletions payment/tests/test_models.py

This file was deleted.

3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Django==5.0.1
requests==2.31.0
setuptools~=69.0.3
django-appointment==3.0.1
django-appointment==3.0.1
django-dotenv==1.4.2

0 comments on commit 66f014f

Please sign in to comment.