Solved. Thanks to Hernani, check the "EDIT N3" below
I followed the bluehost recipe...
I went through almost everything
flawlessly, until the "manage.py
syncdb" line.
As you can see, I have all the modules
working on Python2.6, but when I try
to use manage.py... it does not
work.
- I'm almost giving up with bluehost for not having support for Django...
- I tried to check the adding or deleting 'south'from the installed
applications for the django
settings.py.
- I updated every single module (easy_install works perfectly)
At this time... I don't know what to
do... Would it be related to my
wordpress installation that I'm using
in the same /public_html ?
# python2.6
Python 2.6 (r26:66714, Apr 1 2009, 20:44:00)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
>>> import flup
>>> import MySQLdb
>>> import django
>>> import html5lib
>>> import markdown
my@domain.com [~/.local/lib/python2.6/site-packages/osqa]#
ls
./ .pydevproject init.py cron/ log/ rmpyc
settings_local.py.dist
../ .svn/ init.pyc forum/ manage.py settings.py
settings_local.pyc
.manage.py.swp INSTALL build/ forum_modules/ osqa.iml
settings.pyc tmp/
.project LICENSE cache/ locale/
osqa.wsgi.dist settings_local.py
urls.py
my@domain.com [~/.local/lib/python2.6/site-packages/osqa]#
python2.6 manage.py syncdb --all
There is no South database module 'south.db.None' for your database.
Please either choose a supported
database, check for
SOUTH_DATABASE_ADAPTER[S] settings, or
remove South from INSTALLED_APPS.
Where do I have to fix the
"SOUTH_DATABASE_ADAPTER[S]" settings?
========================================
Edit N1:
This is my .httpd.access
AddHandler application/x-httpd-php5 .php
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Options -Indexes
<Files .htaccess php.ini>
order allow,deny
deny from all
</Files>
#stop bat bots, added on 122210, from
http://www.bluehostforum.com/showthread.php?8846-htaccess-what-we-all-should-have&highlight=.htaccess
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR]
RewriteCond %{HTTP_USER_AGENT} ^Bot mailto:craftbot@yahoo.com [OR]
RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR]
(...)
RewriteCond %{HTTP_USER_AGENT} ^Xaldon WebSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus
RewriteRule ^.* - [F,L]
**#Modification for OSQA, added on 122210 from
http://wiki.osqa.net/display/docs/Installing+OSQA+on+BlueHost+Using+fast-cgi**
AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteRule ^(media.)$ /$1 [QSA,L,PT]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.)$ creativitycloud.fcgi/$1 [QSA,L]
and this is my
creativitycloud.fcgi file (which I added) in my /public_html
#!/home/user/package/bin/python2.6
import sys, os
sys.path.insert(0, "/home/user/package/lib/python2.6/site-packages")
sys.path.append("/home/user/package/lib/python2.6/osqa")
os.chdir("/home/user/package/lib/python2.6/site-packages/osqa")
os.environ['DJANGO_SETTINGS_MODULE'] =
'osqa.settings'
from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="false")
Edit N2: settings_local.py
I have not touched this yet...
# encoding:utf-8
import os.path
SITE_SRC_ROOT = os.path.dirname(file)
LOG_FILENAME = 'django.osqa.log'
for logging
import logging
logging.basicConfig(
filename=os.path.join(SITE_SRC_ROOT,
'log', LOG_FILENAME),
level=logging.ERROR,
format='%(pathname)s TIME: %(asctime)s MSG:
%(filename)s:%(funcName)s:%(lineno)d
%(message)s',
)
#ADMINS and MANAGERS
ADMINS = ()
MANAGERS = ADMINS
DEBUG = False
DEBUG_TOOLBAR_CONFIG = {
'INTERCEPT_REDIRECTS': True
}
TEMPLATE_DEBUG = DEBUG
INTERNAL_IPS = ('127.0.0.1',)
DATABASE_NAME = '' # Or path to database file if using
sqlite3.
DATABASE_USER = '' # Not used with sqlite3.
DATABASE_PASSWORD = '' # Not used with sqlite3.
DATABASE_ENGINE = '' #mysql, etc
DATABASE_HOST = ''
DATABASE_PORT = ''
CACHE_BACKEND = 'file://%s' % os.path.join(os.path.dirname(file),'cache').replace('\\','/')
CACHE_BACKEND = 'dummy://'
SESSION_ENGINE = 'django.contrib.sessions.backends.db'
APP_URL = 'http://' #used by email notif system and RSS
LOCALIZATIONS
TIME_ZONE = 'America/New_York'
this will allow running your forum with url like
http://site.com/forum
#
# FORUM_SCRIPT_ALIAS = 'forum/'
#
FORUM_SCRIPT_ALIAS = '' #no leading slash, default = '' empty
string
#OTHER SETTINGS
USE_I18N = True
LANGUAGE_CODE = 'en'
DJANGO_VERSION = 1.1
OSQA_DEFAULT_SKIN = 'default'
DISABLED_MODULES = ['books', 'recaptcha', 'project_badges']
BTW: after fighting with the apache configurations (in a shared server, at Bluehost), I finally decided to change for a slice (VPN) in Slichehost... Getting it running on Ubuntu 10.04 Lucid Linx with Apache2, MySQL5, and Python2.6.
What about the database settings, did you set those? Can you paste your full settings_local.py file (omitting passwords and such of course)?
I just added the source for settings_local.py