Skip to content

Commit 67eed5a

Browse files
committed
Chore: pythonanywhere 배포 설정
1 parent f02dae5 commit 67eed5a

3 files changed

Lines changed: 27 additions & 16 deletions

File tree

Capstone/settings.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
# SECURITY WARNING: don't run with debug turned on in production!
2929
DEBUG = True
3030

31-
ALLOWED_HOSTS = []
32-
31+
ALLOWED_HOSTS = ['woodzverse.pythonanywhere.com', '127.0.0.1', 'localhost']
3332

3433
# Application definition
3534

Capstone/wsgi.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@
88
"""
99

1010
import os
11+
import sys
1112

12-
from django.core.wsgi import get_wsgi_application
13+
path = '/home/woodzverse/BooRRNG_Backend' # PythonAnywhere 계정
14+
if path not in sys.path:
15+
sys.path.append(path)
1316

14-
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Capstone.settings')
17+
os.environ['DJANGO_SETTINGS_MODULE'] = 'Capstone.settings'
1518

16-
application = get_wsgi_application()
19+
from django.core.wsgi import get_wsgi_application
20+
from django.contrib.staticfiles.handlers import StaticFilesHandler
21+
application = StaticFilesHandler(get_wsgi_application())

requirements.txt

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
asgiref==3.8.1
2-
cffi==1.17.1
3-
cryptography==44.0.2
4-
Django==5.1.7
5-
djangorestframework==3.15.2
6-
djangorestframework_simplejwt==5.5.0
7-
gunicorn==23.0.0
8-
packaging==24.2
9-
pycparser==2.22
10-
PyJWT==2.9.0
1+
asgiref==3.4.1
2+
backports.zoneinfo==0.2.1
3+
cffi==1.15.1
4+
cryptography==40.0.2
5+
Django==3.2.25
6+
djangorestframework==3.15.1
7+
djangorestframework-simplejwt==4.4.0
8+
gunicorn==21.2.0
9+
importlib-metadata==4.8.3
10+
importlib-resources==5.4.0
11+
packaging==21.3
12+
pycparser==2.21
13+
PyJWT==1.7.1
14+
pyparsing==3.1.4
1115
python-decouple==3.8
12-
sqlparse==0.5.3
16+
pytz==2025.1
17+
sqlparse==0.4.4
18+
typing_extensions==4.1.1
19+
zipp==3.6.0

0 commit comments

Comments
 (0)