django-wsgi

Reload django wsgi scripts without root

I have an install of django on apache using embedded wsgi. I DON'T have root on the machine. How can I tell apache to reload the python instance when I deploy new source code? I tried removing all the .pyc files and it still is running the old code. ...

admin/appname/modelname urls does not work with mod_wsgi in Django 1.1rc1

I'm using Django 1.1 rc1 and Apache 2.2.8 on Ubuntu with mod_wsgi 1.3.1 + Python 2.5.2. Everything worked fine with Django's internal testing web server, but after migrating to Apache mod_wsgi, all urls like /admin/appname/modelname/ began not to work. They shows 404 not found errors with the following log: ... ^admin/ ^$ ^admin/ ^logo...

Share Python Interpreter in Apache Prefork / WSGI

I am attempting to run a Python application within Apache (prefork) with WSGI in such a way that a single Python interpreter will be used. This is necessary since the application uses thread synchronization to prevent race conditions from occurring. Since Apache prefork spawns multiple processes, the code winds up not being shared betwee...

It is said best way to deploy django is using wsgi, I am wondering why?

We are deploying django application, I found in the documentation that it is recommended to use WSGI appoach for doing that. Before deploying I wanted to know, why it is recommended over other two approaches i.e. using mod_python and fastcgi... Thanks a lot. ...

mod-deflate does not work with mod-wsgi in daemon mode

My client program is sending a gzip-ed http request, which is decompressed by the mod-deflate InputFilter in Apache. This works when I am using mod-wsgi (without any custom configurations) to serve a django site that is receiving compressed requests. However, when I turn on daemon mode via the WSGIDaemonProcess directive, the django site...

Django sys.path.append for project *and* app needed under WSGI

Hi all, Could somebody give me a pointer on why I need to add my project root path to the python path as well as the application itself in my WSGI file? Project base is called 'djapp', the application is called 'myapp'. sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..') sys.path.append(os.path.dirname(os.path.abspath(...

Right way to have a thread in parallel to django project on wsgi.

Hi guys. I'm writing a django project, and I need to have a parallel thread which performs certain tasks. The project will be deployed in Apache2.2 with mod_wsgi. Actually my implementation consists on a thread with a while True - Sleep which is called from my django.wsgi file. Is this implementation correct? Two problems raises: do...

Django localeURL when WSGIScriptAlias is /PREFIX

Good morning everyone, Introduction I Got a question about localeURL usage. Everything works great for me with url like this : http://www.mysite.com/ If I type http://www.mysite.com/ in adress bar, it turns correctly in http://www.mysite.com/en/ for example. If I use the view change_locale, it's also all right (ie change www.mysite...

How i say the interpreter version for wsgi apache

In debian recently change de default version of python from 2.5 to 2.6 but i need 2.5, how i can configure apache and/or wsgi script to say it use pythons2.5 and not python default? ...

Redirect stdout and stderr to file in Django with wsgi

I'm trying to make django work with wsgi in a shared hosting, so I cannot access server logs, I'm trying to redirect the output to a file in my django.wsgi script, like this: saveout = sys.stdout log_out = open('out.log', 'w') sys.stdout = log_out but this is the error that I have (in the only error log that I can access) [Thu Oc...

'WSGIRequest' object has no attribute 'LANGUAGE_CODE'

when i disable cms.middleware.multilingual.MultilingualURLMiddleware i have Caught an exception while rendering 'WSGIRequest' object has no attribute 'LANGUAGE_CODE' when edit pages, or use {% show_menu_below_id %} tag.. I'm dont need lang prefix please, help me disable this stuff. ...

Problems rendering a view with tidy (Django + Apache mod_wsgi)

When running under the in-built development server, all runs fine. However, when running under mod_wsgi in Apache, the following code (a replacement method for django.shortcuts.render_to_response) causes an internal server error: # Tidy and render def render_tidy_response(*args, **kwargs): httpresponse_kwargs = { ...