Skip to content

Commit

Permalink
UPY-#246 - Change app conf
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandoCelmer committed Jan 9, 2022
1 parent 5c85b58 commit a136987
Show file tree
Hide file tree
Showing 9 changed files with 803 additions and 13 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,7 @@ upy.pem
!.elasticbeanstalk/*.global.yml

.env-dev
.env-prod
.env-prod

db_manager.cnf
db_application.cnf
6 changes: 6 additions & 0 deletions _db_application.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[client]
database = DB_NAME
host = 0.0.0.0
user = DB_USER
password = DB_PASSWORD
default-character-set = utf8
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# warnings.simplefilter('error', DeprecationWarning)

BASE_DIR = dirname(dirname(dirname(dirname(os.path.abspath(__file__)))))
BASE_DIR = dirname(dirname(dirname(os.path.abspath(__file__))))
CONTENT_DIR = os.path.join(BASE_DIR, 'content')
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'

Expand Down
Empty file removed app/conf/development/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion app/conf/production/settings.py → app/conf/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from django.utils.translation import gettext_lazy as _
from sentry_sdk.integrations.django import DjangoIntegration

BASE_DIR = dirname(dirname(dirname(dirname(os.path.abspath(__file__)))))
BASE_DIR = dirname(dirname(dirname(os.path.abspath(__file__))))
CONTENT_DIR = os.path.join(BASE_DIR, 'content')
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'

Expand Down
Empty file removed app/conf/production/__init__.py
Empty file.
4 changes: 2 additions & 2 deletions app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
DJANGO_ENV = env("DJANGO_ENV")

if DJANGO_ENV == 'production':
from .conf.production.settings import *
from .conf.production import *
else:
from .conf.development.settings import *
from .conf.development import *
Loading

0 comments on commit a136987

Please sign in to comment.