Skip to content

Commit

Permalink
Fix/59/uwsgi (#70)
Browse files Browse the repository at this point in the history
* #59 fix : modify module route

* #59 fix : separate settings.py
  • Loading branch information
0321minji authored Jul 13, 2024
1 parent e6ebf54 commit 4c29b4b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
27 changes: 4 additions & 23 deletions UpcyProject/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
"core.apps.CoreConfig",
"products.apps.ProductsConfig",
"services.apps.ServicesConfig",
"sslserver",
]
THIRD_APPS = [
]
Expand Down Expand Up @@ -173,28 +172,10 @@
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

#s3 setting
load_dotenv()

# load_dotenv()
dotenv_path = os.path.join(BASE_DIR, '.env')
load_dotenv(dotenv_path)
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.environ.get('AWS_STORAGE_BUCKET_NAME', 'upcy-bucket')
AWS_S3_REGION_NAME = os.environ.get('AWS_S3_REGION_NAME', 'ap-northeast-2')

LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'file': {
'level': 'DEBUG',
'class': 'logging.FileHandler',
'filename': '/var/log/django/debug.log',
},
},
'loggers': {
'django': {
'handlers': ['file'],
'level': 'DEBUG',
'propagate': True,
},
},
}
AWS_S3_REGION_NAME = os.environ.get('AWS_S3_REGION_NAME', 'ap-northeast-2')
19 changes: 19 additions & 0 deletions UpcyProject/settings/production.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from settings import *
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'file': {
'level': 'DEBUG',
'class': 'logging.FileHandler',
'filename': '/var/log/django/debug.log',
},
},
'loggers': {
'django': {
'handlers': ['file'],
'level': 'DEBUG',
'propagate': True,
},
},
}

0 comments on commit 4c29b4b

Please sign in to comment.