我是django的新成員。我試過但我無法部署。我該怎麼辦在alwaysdata.com部署Django
#!/usr/bin/python
import sys
import os
base = os.path.dirname(os.path.abspath(__file__)) + '/..'
sys.path.append(base)
os.environ['DJANGO_SETTINGS_MODULE'] = 'myfirstapp.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
AddHandler fcgid-script .fcgi
Options +FollowSymLinks
RewriteEngine On
RewriteBase/
RewriteRule ^(media/.*)$ - [L]
RewriteRule ^(adminmedia/.*)$ - [L]
RewriteCond %{REQUEST_URI} !(cgi-bin/myproject.fcgi)
RewriteRule ^(.*)$ mysite.fcgi/$1 [L]
給我一個工作示例 – Emrah 2009-12-23 20:40:57
你有錯誤嗎?你在第5行缺少一個+,你的意思是「../」而不是「/ ..」? – Seth 2009-12-23 20:45:27