.htacesss
Código:
Addhandler cgi-script .py
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.py/$1 [QSA,L]
archivo index.py
Código Python:
Ver original#!/usr/bin/env python
import sys, os, site
from traceback import format_exc
try:
site.addsitedir('/home/usurario/site-packages')
sys.path.insert(0,"/home/usurario/site-packages/django")
sys.path.insert(0,"/home/usurario/site-packages/mptt")
sys.path.insert(0,"/home/usurario/public_html")
os.chdir("/home/usurario/public_html/site")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "projec.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
except Exception:
open("/home/usurario/public_html/site/log.txt", "w").write(format_exc())
raise
logs.txt
Código:
Traceback (most recent call last):
File "index.py", line 15, in <module>
from django.core.wsgi import get_wsgi_application
ImportError: No module named wsgi
pero anda no se que pasa no anda