Questions tagged [mod-python]

Mod_python is an Apache module that embeds the Python interpreter within the server.

Mod_python is an Apache module that embeds the Python interpreter within the server. With mod_python you can write web-based applications in Python that will run many times faster than traditional CGI and will have access to advanced features such as ability to retain database connections and other data between hits and access to Apache internals.

Currently mod_python is not under active development. This does not mean that it is "dead" as some people have claimed. It smiply means that the code and the project are mature enough when very little is required to maintain it.

Projects website:

Current State of Mod_Python

289 questions
1
vote
0 answers

Django-cms problems on apache server

I've installed Django 1.3 with django-cms. All is working perfect under self development webserver. While I install a fresh copy based on apache + mod_python, it has some problems that not meet in development. I set the http://www.domain.com/mycms…
Dan He
  • 99
  • 7
1
vote
3 answers

Different behavior of python logging module when using mod_python

We have a nasty problem where we see that the python logging module is behaving differently when running with mod_python on our servers. When executing the same code in the shell, or in django with the runserver command or with mod_wsgi, the…
Michael
  • 780
  • 6
  • 14
1
vote
1 answer

Python Module by Path

I am writing a minimal replacement for mod_python's publisher.py The basic premise is that it is loading modules based on a URL scheme: /foo/bar/a/b/c/d Whereby /foo/ might be a directory and 'bar' is a method ExposedBar in a publishable class in…
Aiden Bell
  • 28,212
  • 4
  • 75
  • 119
1
vote
1 answer

Django newbie trying to get treeio to work behind apache

I seem to have similar problem as this guy: Django newbie deployment question - ImportError: Could not import settings 'settings' but i cant make heads or tails of it. The server is running Debian. The app runs fine on internal server, however when…
tskulbru
  • 2,336
  • 1
  • 20
  • 38
1
vote
2 answers

mod_python publisher and pretty URLs

I am new to Python (I am getting out of PHP because of how increasingly broken it is), and I am racing through porting my old code. One thing: I have a file /foo.py with functions index() and bar(), so, with the publisher I can access…
NewToPython
1
vote
2 answers

logging in mod_python/apache

What is the standard way to make python's logging module work with apache/modpython? I want to call mylog.warn('whatever') and have that result in a call to req.log_error() where req is the modpython request. Is there an easy way to set this up?
zak23
  • 3,378
  • 5
  • 30
  • 28
1
vote
1 answer

import python module when using mod_python

i have been using imdbpy for some time. I was interested in making a very basic webservice to return json data. I have a basic system working earlier today however after a reboot i now get the following error AssertionError: Import cycle in…
encodes
  • 741
  • 4
  • 18
1
vote
2 answers

How do mod_php, mod_python, mod_Language work

Some of the Apache modules are related to programming languages, like mod_php and mod_python. The description is basically "enables usage of php within apache" or "enables usage of python within apache". I'm trying to understand an overview of how…
sameold
  • 18,400
  • 21
  • 63
  • 87
1
vote
2 answers

How do you open and transfer a file on the filesystem in mod_python?

I'm new to mod_python and Apache, and I'm having trouble returning a file to a user after a GET request. I've got a very simple setup right now, and was hoping to simply open the file and write it to the response: from mod_python import apache def…
Roger
1
vote
1 answer

Set http response Content-Type to "xml" in python

How do I display on an html page an xml? how can I set in python text/html? I'm writing in the html as: response.out.write
bb2
  • 2,872
  • 7
  • 37
  • 45
1
vote
2 answers

django 1.3 upgrade problem

I recently updgraded to django 1.3. After the upgrade, I get the following error whenever I used request.POST: Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py", line 86, in …
Vivek S
  • 5,384
  • 8
  • 51
  • 72
1
vote
0 answers

How to avoid caching in freeswitch mod_python3?

developing python applications for freeswitch I'm currently struggling with the python cache feature. In my dailplan I'm calling a python script using mod_python3. That script imports further modules which I want to modify and test with the next…
Max
  • 11
  • 1
1
vote
1 answer

Error while deploying Django on Apache

I have a small Django website which I am trying to run on an Apache 2.2 HTTP-Server. The application is running fine using "python manage.py runserver". Django Version: 1.0.2 final Python: 2.5 OS: Windows 2000 I wen't through the steps described…
KarlsFriend
  • 745
  • 1
  • 4
  • 17
1
vote
1 answer

Python Server Pages, Session Timeout Set

Real easy one for those Python Server Pages guru's <% user_session = Session.Session(req) user_session['username'] = varUsername user_session['fullname'] = varFullName %> The Session seems to timeout after a short amount of time. How can I set the…
Jim
  • 613
  • 6
  • 16
  • 25
1
vote
2 answers

When deploying TRAC/Subversion (SVN) on Apache with mod_wsgi, TRAC doesn't open any page at all

I've deployed trac using apache/mod_wsgi (no SSL) (preferable, since the problem I'm facing with CGI is performance), and it works fine WITHOUT SVN integration. But I actually need SVN, so when I configure the repository path (i.e: repository_dir =…
Lucas Fragomeni
  • 173
  • 1
  • 9