tags:

views:

433

answers:

2

Hi

I want to install osqa on windows local system for this i have downloaded bitnami-djangostack-1.1.1-2-windows-installer.exe which has in built django,python,mysql & apache. I have run a django example given on the django website. Its working fine.

But i am confused how to install osqa. I have downloaded the source code available on osqa site and readed the installation instruction(requires django 1.1.1). But how to make it working?

Please help me on this

Thanks

+5  A: 
  1. Download http://svn.osqa.net/svnroot/osqa/trunk to a folder {OSQA_ROOT} eg, c:\osqa

  2. Rename {OSQA_ROOT}\settings_local.py.dist to {OSQA_ROOT}\settings_local.py

  3. set following in {OSQA_ROOT}\settings_local.py

    DATABASE_NAME = 'osqa'             # Or path to database file if using sqlite3.
    DATABASE_USER = 'root'               # Not used with sqlite3.
    DATABASE_PASSWORD = 'PASSWD'               # Not used with sqlite3.
    DATABASE_ENGINE = 'mysql'  #mysql, etc
    
  4. add following {DJANGOSTACK}\apps\django\conf\django.conf, / means root folder like http://localhost

    <location '/'>
        SetHandler python-program
        PythonHandler django.core.handlers.modpython
        PythonPath "['{OSQA_ROOT}'] + sys.path"
        SetEnv DJANGO_SETTINGS_MODULE osqa.settings
        PythonDebug On
    </location>
    
  5. instasll markdown2 and html5lib with easy_install.exe, which is inside {DJANGOSTACK}\python\Scripts\

    easy_install markdown2
    easy_install html5lib
    
  6. create new db called osqa with mysqladmin.exe which is in {DJANGOSTACK}\mysql\bin

    mysqladmin create osqa
    
  7. syncdb

    {DJANGOSTACK}\python\python.exe manage.py syncdb
    
  8. enjoy!

alt text

Note:

  • {OSQA_ROOT} => osqa trunk directory
  • {DJANGOSTACK} => BitNami DjangoStack install directory
S.Mark
Pankaj Khurana
S.Mark
Hi Mark, for step 7 i meant running python osqa/manage.py syncdb under bitnami django stack project. When i started the server python osqa/manage.py runserver and typed http://localhost:8000 in the browser, its working now. Thanks for your help. Why is the url http://localhost:8000 instead of just http://localhost? Can you please help me figure out?
Pankaj Khurana
@Pankaj Khurana, you could just run `python osqa/manage.py runserver 80` for just `http://localhost` instead of default port 8000. Btw, manage.py runserver is running on built-in web server, you don't need apache and mod_python and its settings in step 4 for that case.
S.Mark
Hi mark thanks for the reply.Now i want to install osqa on a site hosted on host gator. Can you please tell me these steps will remain same or change as hosting company told us that python and django are pre configured but you have to put them in cgi-bin folder.Thanks
Pankaj Khurana
@Pankaj, could you check your hosting documents for that case? for example, like [this](http://support.hostgator.com/articles/django-with-fastcgi) because those configurations are quite different from running on normal pc.
S.Mark
@Pankaj, If fcgi is supported by your hosting you could refer this wiki from osqa.net - http://wiki.osqa.net/display/docs/Installing+OSQA+on+BlueHost+Using+fast-cgi
S.Mark
Hi Mark, thanks for your suggestions. With the help of hostgator, i have installed osqa on my server. But openid is not functioning at all. I have posted the issue on osqa.net but not received any reply till now. Can you please help me on this?
Pankaj Khurana
@Pankaj Khurana, I noticed that login with blogger and wordpress openid have some issues, which openid provider you are currenting trying? at least google and yahoo openid should work. you getting some error? how about setting debug = TRUE on settings.py or settings_local.py and if you get errors, post new questions to osqa.net or here in stackoverflow with some detail informations?
S.Mark
Pankaj Khurana
really, 404 is quite strange, may be some issues in urls.py
S.Mark
Step 6 gives error: forum.user: 'subscriptions' has an m2m relation wiht model Node, which has either not been installed or is abstract.Solution: easy_install.exe http://sourceforge.net/projects/python-markdown/files/markdown/2.0.3/Markdown-2.0.3.zip/download
James
Actually, I can't get the markdown module to work at all. "easy_install markdown2" works fine, but "easy_install markdown" fails, unless I specify a URL directly (see previous comment). Even after this, however, trying to access OSQA in my browser gives: ImproperlyConfigured: Error importing middleware forum.middleware.extended_user: "No module named markdown". Any suggestions?
James
@James, Yeah, I also noticed that some errors regarding markdown. But IIRC, I did `import markdown2 as markdown` and errors gone. but I still think they might need to fix, could you post it in osqa forum too?
S.Mark