-->start
sudo apt-get install apache2 libapache2-mod-wsgi #https://wiki.debian.org/zh_CN/Apache sudo pip install django cd ~/Projects/ django-admin startproject XiaoHuoBan sudo mv /etc/apache2/sites-available/default /etc/apache2/sites-available/default-bk sudo vim /tec/apache2/sites-available/default WSGIScriptAlias / /home/pi/Projects/XiaoHuoBan/XiaoHuoBan/wsgi.py WSGIPythonPath /home/pi/Projects/XiaoHuoBan <Directory /home/pi/Projects/XiaoHuoBan/XiaoHuoBan> <Files wsgi.py> Order allow,deny allow from all </Files> </Directory> sudo /etc/init.d/apache2 restart mkdir XiaoHuoban/static vim XiaoHuoban/Xiaohuoban/settings.py + STATIC_ROOT = os.path.join(BASE_DIR, ‘static‘) python manage.py collectstatic vim XiaoHuoBan/XiaoHuoBan/urls.py + import settings + url(r‘^static/(?<path>.*)$‘,‘django.views.static.serve‘,{‘document_root‘:settings.STATIC_ROOT}),
--->end
时间: 2024-10-12 12:41:42