start new thread in mod_python

2009-02-11 Thread Xian Chen
Is threading in mod_python allowed? I design my project like this: in the views.py, once the user click some buttons, the view function will start new thread to run some background processes. The site runs good by using Django owner server. But when I using mod_python, it seems the thread do

Apache, Django configuration

2009-02-09 Thread Xian Chen
Hi All, I use mod_python to run Django on Apache. But, I notice all of the urls that Django received are not correct. In deed, the "/" after the domain name is truncated. e.g. http://localhost/admin/ , Django receives "http://localhostadmin; Why this happen? Thanks, Xian

Templaite:display li items alternatively using for

2008-10-31 Thread Xian Chen
Hi, I want to display a list of items by using {% for item in items %}. To make the web pages look better, I want to use two kinds of alternatively. E.G item item My question is how can i use the tags to implement this requirement? Any build-in tags for this? Thanks in advance,

alert table while updating model automatically

2008-10-31 Thread Xian Chen
Hi All, I want to know whether Django support alerting the tables automatically while I modify the models or not. Suppose the website has run a long time and stored lots of data. In this case, the administrator wants to modify the model to add/remove some properties. Does the corresponding

Django v0.95 issue

2008-09-25 Thread Xian Chen
Hi All, I have a problem with Django v0.95 ( I cannot convince the administrator to install 1.0 for me.) I got this feedback:( AttributeError at /xianchen/ 'function' object has no attribute 'rindex' Request Method: GET Request URL: http://ubinet.engr.uconn.edu/xianchen/ Exception Type:

Apache with home directory Django

2008-09-25 Thread Xian Chen
Hi, I want to run my Django app on a shared web server. As so many people share this server, I install python and Django(1.0) under my home directory. How can I configure the Apache with mod_python to make the django under my directory running? The server administrator refused to install

Re: cannot run django with Apache

2007-12-24 Thread Xian Chen
Great & THX On 12/25/07, Empty <[EMAIL PROTECTED]> wrote: > > > > Add this line in the urls.py > > (r'^$','temp.helloworld.index'), > > > > Your url pattern is not going to match a subfolder. Remember as you > have it setup everything after the http://localhost/ is what will be > sent to be

cannot run django with Apache

2007-12-24 Thread Xian Chen
all of my code works well with the django server, but not for Apache SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE temp.settings PythonDebug On PythonPath "['/home/xian/mycode'] + sys.path" here is