wsgi

How does one run Spawning with Django within a virtualenv?

Because of the way Eventlet, which Spawning depends on, installs itself, it can't be installed into a virtualenv. The following error (wrapped for readability) illustrates: Running eventlet-0.9.4/setup.py -q bdist_egg --dist-dir \ /tmp/easy_install-m_s75o/eventlet-0.9.4/egg-dist-tmp-fAZK_u error: SandboxViolation: chmod('/home/myuser/...

WSGI blogging software for programmers

Hi. I'm new to python w/o WSGI, but I have a C/C++ and PHP background. Do you know any blogging software written as a WSGI application on top of spawning, eventually by using werkzeug? Analysing such a code would give me a better understanding of how things work and/or should work. Thanks. Addendum: SQLAlchemy changed its API since 0....

Pinax (13, 'Permission denied')

I'm a noob but I made my application work beautifully using python manage.py runserver but when I brought it to Apache + mod_wsgi, I keep getting this error. The debug messages aren't much help. Here is a screenshot of the entire debug image: http://img694.imageshack.us/img694/6723/screenshotfb.png Here is the dump of my http.conf file....

Pylons: response renaming? Is there a better way?

Hi, I've got a Pylons controller with an action called serialize returning content_type=text/csv. I'd like the response of the action to be named based on the input patameter, i.e. for the following route, produced csv file should be named {id}.csv : /app/PROD/serialize => PROD.csv (so a user can open the file in Excel with a proper nam...

How do I use Flickzeug to get interactive tracebacks from a paste deploy WSGI pipeline?

I'd like to use Flickzeug to see interactive tracebacks by adding it to my paste deploy file's pipeline. The following doesn't work. What will? [pipeline] pipeline = flickzeug myapp ...

looking for a Python based web-app to serve files

I am looking for a Python-based alternatives for AutoIndex PHP Script. Preferably it runs under WSGI. The features of AutoIndex are listed here and there is also a live demo. Note: + I'm not looking for a web server. My shared web hosting doesn't allow me to run my own background process. + Neither am I looking for web frameworks (I am...

Deplying Django with WSGI: App Import Error

Hi I am new in apache, linux and python world. I am trying to deploy django application on apache using WSGI (the recommended way). My django project directory structure is as follows... / /apache/django.wsgi /apps/ #I put all my apps in this directory /apps/providers/ /apps/shopping/ /apps/... /middleware/ ... In apache I have fo...

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. ...

How do you assign a wsgi app to the root of cherrypy via the config file?

How do you assign a wsgi app to the root of cherrypy via the config file? I'd like the request "http://localhost:8080/" to route to my own wsgiapp. I'm using cherryd to start a cherrypy server with a config file as follows: Here's the invocation: cherryd --config config.cfg --import myapp Here's the config.cfg file: [global] server...

What is the appropriate way to intercept WSGI start_response?

I have WSGI middleware that needs to capture the HTTP status (e.g. 200 OK) that inner layers of middleware return by calling start_response. Currently I'm doing the following, but abusing a list doesn't seem to be the “right” solution to me: class TransactionalMiddlewareInterface(object): def __init__(self, application, **config): ...

Prevent wsgi from modifying 401 responses.

If I have the following pylons controller: def challange(self): response.status = '401 Unauthorized' return 'You are not logged in.' I would expect to see 'You are not logged in.' But I see : Unauthorized This server could not verify that you are authorized to access the document you requested. Either you supplied the...

Implement Rest interface with Python + WSGI

Hi, I need to implement REST web services using Python. I am using Apache web server with WSGI module. I found lot of frameworks to implement the REST like Django, bobo, etc..I am confused which one to use. Can anyone suggest me a framework which i can use for this scenario? Anandan ...

making apache and django add a trailing slash

Hello. My /train directory is aliased to a script in httpd.conf by: WSGIScriptAlias /train /some-path/../django.wsgi And it works well, except for one problem. If a user goes to /train (with no trailing slash) it will not redirect him to /train/, but will just give him the right page. This is a problem because this way the relative lin...

Redirecting a HTTP rqueust and response code/headers

Hi, I have a loosely coupled web app (one part uses PHP, the other uses WGSI). The WSGI/python framework shares the authentication with the PHP app, meaning that generally, the user should Log in via the PHP interface Now the user can access any of the WSGI pages [this part works if the user has logged in] What I want to do though, ...

How do I download image from datastore in app engine and Django without using Wsgi Request Handler.

How do I download image from datastore in app engine and Django without using Wsgi Request Handler. ...

Accessing php $_SESSION from python (wsgi) - is it possible?

Hi, I've got a python/WSGI app which needs to check to see if a user has logged on to a PHP web app. The problem is that the PHP app checks if a user has logged on by comparing a value in the $_SESSION variable to a value in the cookie from the user's browser. I would prefer to avoid changing the behavior of the php app if at all possib...

Does anyone have feeback on using Psyco in a wsgi application?

Did you try Psyco in a wsgi application (custom, Pylons, Django...)? What does your set up look like? Did you get measurable results? ...

Pushing data once a URL is requested

Given, when a user requests /foo on my server, I send the following HTTP response (not closing the connection): Content-Type: multipart/x-mixed-replace; boundary=----------------------- ----------------------- Content-Type: text/html <a href="/bar">foo</a> When the user goes to /bar (which will send 204 No Content so the view doesn'...

replay in django + apcahce + mod_wsgi ??

I have a simple django page that has a counter on it. I use Apache2 with mod_wsgi to serve it. First, when I enter this page, the counter shows 0, as it should. The second time when I enter the page the counter shows 1 - again, it is the right behavior. The problem begins now, cause when I enter this page the third time, I get 0 again. ...

Use multiple WSGI mount points in Apache with an Nginx reverse proxy

I am trying to set up multiple virtual hosts on the same server with Nginx and Apache and have run into a curious configuration issue. I have nginx is configured with a generic upstream to apache. upstream backend { server 1.1.1.1:8080; } I'm trying to set up multiple subdomains in nginx that hit different mountpoints in apache. E...