Posted by iain |
|
I am just about finished setting-up my new site based around SCT :)
I am now thinking about how to deploy the site. Are my ideas/assumptions valid? I am going to use Django with Apache and mod_python as that seems to be the recommended route (at least by Django). As I will be doing at least one other SCT based site I was going to put the communitytools apps into my site-packages location. I created my project in the normal way django-admin.py startproject mysiteThe SCT templates and the configs will then live in the directory mysite/community/. In the future additional Django apps will go into mysite/otherapp/ etc. The static stuff will live outside the project directory to be served by Apache directly. I have made the assumption that the settings_local.py takes precedence over settings.py. So I have deleted the SCT settings.py but incorporated relevant variables into mysite/settings.py. The remaining SCT specific stuff has gone into mysite/community/settings_local.py. In a similar way I have removed the SCT urls.py but included the locations into mysite/urls.py. Now I haven't got this all working yet but I think this is just down to some paths being incorrect. Does this sound feasible or is there a better way of doing it. Iain. |
|
Posted by Herbert Poul |
|
i personally am using apache 2 with mod_wsgi - the reason is quite simple.. mod_python didn't work well together with the python xapian libraries (for the forum search functionality) - so if you need search you need mod_wsgi ...
another important thing to consider is.. if you have multi byte characters (ie. non-ascii characters) in the wiki you should use python2.5 otherwise the 'diff' between wiki snips will not work..
cool :) well.. i would actually just symlink it into site-packages instead of moving it there.. (this way the sources and the static css & co could still be in one place)
hmm.. yes.. sounds good.. are you also using the CommunityDraft project as a base ? on my installation i have a simple dummy project which includes the CommunityDraft configuration in it's settings.py and then builds upon it: from community.settings import *
you mean you copied these statements like: (r'^community/', include('sphene.community.urls'), defaultdict), ? i guess this makes sense.. another way would be to have CommunityDraft in your PYTHON_PATH and just include it like .. from community.urlconfs import community_urls urlpatterns = patterns( '', ... *patterns for your application* ) urlpatterns += community_urls.urlpatterns (ie. just append the original urlconfs to yours) .. but i gues it doesn't really matter to ahve 1 line per SCT application you are using ..
let me know if i can help you in any way :) Hey, we have Signatures !!! Great, isn't it ? ;) |
|
Posted by iain |
|
Thanks for the reply.
The search facility is of interest. I saw the warning in the SCT docs for search however the server I was going to use (Debian Etch) is using mod_python 3.2 and thought I might be OK.
Oh! Like accented characters. Everything is currently on python2.4 bummer.
Just to be clear are you suggesting something like mkdir /home/iain/src cd /home/iain/src svn co http://..communitytools communitytools svn co http://..communitydraft communitydraft ln -s /u/l/p/site-packages/communitytools communitytools ln -s /u/l/p/site-packages/communitydraft communitydraft I can see that would make upgrading much easier. The different sites would still have different css, images and possibly templates.
Yes.
I don't understand what you mean here.
Yes.
Not every site would use every app so I thought it would be a good reminder of which site used which apps.
Thanks :) Sorry for being so verbose but I intend to write-up every step taken. |
|
Posted by Herbert Poul |
|
i have no idea.. i tried it a few months ago and couldn't get it to work with mod_python: http://www.modpython.org/pipermail/mod_python/2008-April/025241.html
and it seems the bug is still not fixed: http://issues.apache.org/jira/browse/MODPYTHON-217
exactly .. this is REALLY annoying.. but the python diff utils prior to python 2.5 didn't handle multi byte characters correctly :( (the most annoying thing is, that the postgresql driver and a couple of other debian etch packages aren't compatible with python 2.5 :( so it's a real hassle to get it up and running :( ) another thing.. if you are using mysql .. make sure all tables are using utf-8 .. i made the mistake once not to check that (since i'm usually using postgresql) and so no umlauts & co worked ..
basically yes, but you should only symlink the python modules like ln -s /mycheckoutdir/communitytools/sphenecoll/sphene /u/l/p/site-packages/sphene
well ... if you have the CommunityDraft in your PYTHON_PATH this would import all settings from the default community draft settings .. might safe you configuring all MIDDLEWARE_CLASSES or whatever.. but.. well.. it depends on how heavily you base your work on CommunityDraft .. if you build your site from ground up it probably makes no sense at all because you have a completely different setup anyway :)
no problem, i'm pretty sure it could help other people when they discover those threads.. i'm eager to see your site online :) i hope it will be public on the internet ? ;) Hey, we have Signatures !!! Great, isn't it ? ;) |
|
Posted by iain |
|
I just looked at that bug you linked to and guess what
Here goes wsgi then... except...
The Etch package of libapache2-mod-wsgi only works with python2.4 too. I only use postgresql so I will need to look into this.
OK got you now.
It will certainly be online but I am not the site owner. Some fora will be private, and by invitation only, as the subject matter is about personal finance. That was why I was interested in https in another thread. I will certainly post to the forum when the site goes live (though that might be a wee bit longer than planned for - sorting through all the stuff above ;) ) |
Please login to post a reply.