延續前2篇文章:
在Django網站中採用美食廣場Bootstrap 5 電子商務樣版
在Django網站中採用美食廣場Bootstrap 5 電子商務樣版(續)
1. 把FoodMart壓縮成zip
2.把壓縮檔上傳到pythonanywhere,並透過unzip解壓縮成下列檔案:
4.設定WSGI配置檔案
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # +++++++++++ DJANGO +++++++++++ # To use your own django app use code like this: import os import sys # assuming your django settings file is at '/home/myusername/mysite/mysite/settings.py' path = '/home/cmlin/FoodMart' if path not in sys.path: sys.path.insert(0, path) os.environ['DJANGO_SETTINGS_MODULE'] = 'FoodMart.settings' # serve django via WSGI from django.core.wsgi import get_wsgi_application application = get_wsgi_application() |
5.設定靜態檔案的路徑:
沒有留言:
張貼留言