Skip to content

Commit

Permalink
Merge pull request #8 from arthurarty/ch-set-env
Browse files Browse the repository at this point in the history
Setup env variables.
  • Loading branch information
mwanjajoel committed Feb 22, 2020
2 parents 449971d + aafeeda commit 2eb189e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .env_example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SECRET_KEY= # SECRET_KEY
DEBUG= #true for development dont sent in production
7 changes: 5 additions & 2 deletions djangomomoapi/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

import os

from dotenv import load_dotenv

load_dotenv()
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

Expand All @@ -20,10 +23,10 @@
# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'ld0%x$9gjq3c#05d5*#0o*e%kdi&@d02(hcjs+hrahs38*6p%('
SECRET_KEY = os.getenv('SECRET_KEY')

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = os.getenv('DEBUG')

ALLOWED_HOSTS = []

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ keyring==21.1.0
pkginfo==1.5.0.1
pycodestyle==2.5.0
Pygments==2.5.2
python-dotenv==0.11.0
pytz==2019.3
readme-renderer==24.0
requests==2.22.0
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# This does all the work once called
setup(
name="django-momoapi",
version="1.0.0",
version="1.1.0",
description="This is a Django package for the MTN MoMo API.",
long_description=README,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 2eb189e

Please sign in to comment.