2
我一直在嘗試配置python環境以使用Pelican進行靜態博客。這是Django常見的設置,所以我想知道我需要放入什麼,以便它可以開始使用Pelican。配置passenger_wsgi.py以使用Pelican
import os, sys
sys.path.append('/path/to/your/DjangoProjects')
os.environ['DJANGO_SETTINGS_MODULE'] = 'example_com.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
順便說一句,我的服務器正常工作與此設置。
def application(environ, start_response):
start_response('200 OK', [('Content-type', 'text/plain')])
return ["Hello, world!"]