Tagged Questions
111
votes
10answers
14k views
Reducing Django Memory Usage. Low hanging fruit?
My memory usage increases over time and restarting Django is not kind to users.
I am unsure how to go about profiling the memory usage but some tips on how to start measuring would be useful.
I have ...
23
votes
2answers
21k views
Differences and uses between WSGI, CGI, FastCGI, and mod_python in regards to Python?
I'm just wondering what the differences and advantages are for the different CGI's out there. Which one would be best for python scripts, and how would I tell the script what to use?
14
votes
4answers
2k views
Get the version of Django for application
I am starting a new (actually very old) project which I know is in Django. I am getting lost knowing the exact version of Django it has been build upon. Is there a way I can know the version of Django ...
14
votes
2answers
26k views
Django newbie deployment question - ImportError: Could not import settings 'settings'
The app runs fine using django internal server however when I use apache + mod_python I get the below error
File "/usr/local/lib/python2.6/dist-packages/django/conf/__init__.py", line 75, in ...
13
votes
11answers
11k views
A good multithreaded python webserver?
I am looking for a python webserver which is multithreaded instead of being multi-process (as in case of mod_python for apache). I want it to be multithreaded because I want to have an in memory ...
12
votes
2answers
13k views
Python for web development in Apache [closed]
I've been playing with mod_python in apache2 which seems to work differently than python does in general - there's a bit different syntax and things you need to do. It's not very well documented and ...
11
votes
3answers
4k views
Converting from mod_python to mod_wsgi
My website is written in Python and currently runs under mod_python with Apache. Lately I've had to put in a few ugly hacks that make me think it might be worth converting the site to mod_wsgi. But ...
8
votes
2answers
11k views
Serving static files with mod_wsgi and Django
I have a django application using mod_python, fairly typical configuration except that media files are being served by a (I know, not recommended) 'media' directory in the document root. I would like ...
8
votes
5answers
9k views
How to setup and run Python on Wampserver?
Can anyone help me to set up Python to run on Wampserver. From what I've read so far you would need to use a combination of Wampser, Python, mod_pyhton, and adjustment to the Apache http.conf file. ...
7
votes
4answers
3k views
Restarting a Django application running on Apache + mod_python
I'm running a Django app on Apache + mod_python. When I make some changes to the code, sometimes they have effect immediately, other times they don't, until I restart Apache. However I don't really ...
6
votes
3answers
13k views
Setting up Python on Windows/ Apache?
I want to get a simple Python "hello world" web page script to run on Windows Vista/ Apache but hit different walls. I'm using WAMP. I've installed mod_python and the module shows, but I'm not quite ...
4
votes
4answers
1k views
django request.POST contains <could not parse>
I am having a django form to get the username,password. when the user posts data, i see that the post dictionary contains the following(traceback),
Traceback (most recent call last):
File ...
4
votes
1answer
10k views
mod_python for python 2.7
I recently downloaded python 2.7 on my computer (x64) and I would like to install mod_python for it (I have apache 2.2), however, I can't find a mod_python release supporting python 2.7. Has ...
4
votes
3answers
2k views
Browser Detection Python / mod_python?
I want to keep some statistics about users and locations in a database. For instance, I would like to store "Mozilla","Firefox","Safari","Chrome","IE", etc... as well as the versions, and possibly the ...
4
votes
4answers
712 views
deploying a WSGI application on mod_python
I wrote a WSGI application which I need to deploy to a server, however I've been given a server that already has mod_python installed.
I am not allowed to remove mod_python since there are some ...
4
votes
2answers
2k views
Making Python scripts work on MAMP
I'm using mamp server for testing out all my web pages. I'm new to python. I'm able to run a script in python interpreter that will normally print a hello world.
print "Hello World!"
So i used ...
4
votes
0answers
5k views
How to Compile Mod_Python 3.3.1 for Python 2.6 and Apache 2.2 on Windows?
I have no experience compiling code other than using Visual Studio's Build command. I am hoping we can create a step by step guide for compiling mod_python on windows. Please be as descriptive as ...
3
votes
2answers
2k views
Get client ip with python
I'm a newbie in python.
I want to write a simple web that prints the client ip on screen
my http.conf Handler:
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On
...
3
votes
3answers
1k views
How do I modify sys.path from .htaccess to allow mod_python to see Django?
The host I'm considering for hosting a Django site has mod_python installed, but does not have Django. Django's INSTALL file indicates that I can simply copy the django directory to Python's ...
3
votes
1answer
458 views
python webpage mod_wsgi
Before I used mod_python for python websites. Unfortunately mod_python is not up to date any more so I looked for another framework and found mod_wsgi.
In mod_python it was possible to have an index ...
3
votes
1answer
288 views
Web content filter with Apache + mod_wsgi?
I'd like to write a simple web content filter with flexible filtering rules that are written in Python. The filter is to be used as a forward proxy.
Now, I have trouble choosing the right tools for ...
3
votes
1answer
1k views
Djangobb problem
I've installed Djangobb app on my server (Debian, mod_python) by cloning original source. The only things I've changed is database options in settings.py. All needed components are installed - syncdb ...
3
votes
1answer
2k views
How do I upload a file with mod_python?
I want to create a simple file upload form and I must be completely incapable. I've read docs and tutorials,but for some reason, I'm not getting the submitted form data. I wrote the smallest amount of ...
3
votes
1answer
191 views
Can I run flask on an Apache server with mod_python?
I have a pre-configured Apache server with neither root nor any shell access. I only can push files via ftp.
However, I know that the server supports Python via mod_python. Here is what the config ...
2
votes
4answers
470 views
Problems running beautifulsoup4 within Apache/mod_python/Django
I'm was trying to render an HTML-page on the fly using BeautifulSoup version 4 in Django (using Apache2 with mod_python).
However, as soon as I pass any HTML-string to the BeautifulSoup constructor ...
2
votes
6answers
2k views
mod_php vs mod_python
Why mod_python is oop but mod_php is not ?
Example :We go to www.example.com/dir1/dir2
if you use mod_python apache opens www/dir1.py and calls dir2 method
but if you use php module apache opens ...
2
votes
3answers
3k views
How do I change which version of python mod_python uses
I'm doing some introductory work with django which seems really easy (and fun) so far but I have been doing all this from Python 2.6 which I installed in /opt/local (RedHat 5.3) because the python ...
2
votes
1answer
1k views
Is there a mod_python for Apache HTTP Server 2.2 and Python 2.6 or 3.0?
I poked around the mod_python website and I only found the files for Python 2.5 and earlier for Apache HTTP Server 2.2. I Googled around a little, without significant luck. Any suggestions?
2
votes
1answer
3k views
Django on Apache web server 'dict' object has no attribute 'render_context'
I'm having a bit of a problem, I uploaded my Django project to a webserver running apache, mod_python, and django. On the computer I developed on the following works fine
nameBox = ...
2
votes
1answer
1k views
python ascii codes to utf
So when i post a name or text in mod_python in my native language i get:
македонија
And i also ...
2
votes
2answers
1k views
Compared to mod_wsgi, how does mod_python “work”?
It seems most of the blog posts the web relating to mod_python & mod_wsgi concentrate on telling me how mod_wsgi is better and what a WSGI application looks like. This is fine, but what I'd really ...
2
votes
2answers
4k views
Running Django in Virtualenv using Apache with Mod_Python and Multiple Python installations
I would like to run a Django project on a server using virtualenv in Apache using mod_python. Now I know that the recommended apache module to use is mod_wsgi, but I don't want to install that for ...
2
votes
1answer
4k views
cgi.FieldStorage always empty - never returns POSTed form Data
This problem is probably embarrassingly simple.
I'm trying to give python a spin. I thought a good way to start doing that would be to create a simple cgi script to process some form data and do some ...
2
votes
2answers
4k views
Reading request parameters in Python
I am very new to python and having to get into this stuff for a simple program to integrate with an ASP.NET application that I am building. The pseudo code is as follows.
Get two parameters from ...
2
votes
3answers
1k views
Django custom auth backend not recognized on Apache
I'm trying to deploy my Django application to an Apache2 based server with mod_python. I've set the handlers right and made the configuration to make mod_python work with my project. My project ...
2
votes
2answers
226 views
Really odd (mod)_python problem
this one is hard to explain!
I am writing a python application to be ran through mod_python. At each request, the returned output differs, even though the logic is 'fixed'.
I have two classes, ...
2
votes
1answer
4k views
How do I delete mod_python?
I keep getting these errors in my Apache logs:
[error] python_init: Python version mismatch, expected '2.6.5+', found '2.6.6'.
[error] python_init: Python executable found '/usr/bin/python'.
[error] ...
2
votes
1answer
559 views
Django logs: any tutorial to log to a file
I am working with a django project, I haven't started. The developed working on the project left. During the knowledge transfer, it was told to me that all the events are logged to the database. I ...
2
votes
2answers
685 views
Catching errors when logging with SocketHandler in Python
My web application runs on multpile apache instances and I am having multiprocess logging issues because of this. I am currently using a SocketHandler for logging to a daemon using SocketServer that ...
2
votes
2answers
530 views
How to make Apache/mod_python process collect its zombies?
Apache/2.2.6 (Unix) DAV/2 mod_python/3.2.8 Python/2.4.4 configured ...
One of apache processes spawns some long-running python script asynchronously, and apparently doesn't seem to collect its child ...
2
votes
1answer
1k views
Python Server Pages Implementations
I've been a PHP developer for quite awhile, and I've heard good things about using Python for web scripting. After a bit of research, I found mod_python, which integrates with Apache to allow Python ...
2
votes
1answer
152 views
Failed to get separate instances of a class under mod_python
I'm trying to run some python code under Apache 2.2 / mod_python 3.2.8. Eventually the code does os.fork() and spawns 2 separate long-run processes. Each of those processes has to create a separate ...
2
votes
2answers
25 views
Why are my mod_python global variables resetting?
I have a server using apache2 with mod_python that seems to reset global variables after some short period of time. Until this happens, all the features of the server and global variables are handled ...
2
votes
1answer
146 views
i update djang1.3.1 to djang1.4 , error: MOD_PYTHON ERROR
I updated djang1.3.1 to djang1.4.
In my local env ,that's fine.
but when i ci my code to server ,error happened!
in my server , i can use 'python manage.py shell'
and can 'import settings', that's ...
2
votes
1answer
1k views
python list to javascript array
Probably a quick answer from you experts, but i am stumbling upon a interesting challenge that I can't wrap my head around.
I have a python .psp file that contains both a list mylist[] which gets ...
2
votes
1answer
227 views
CherryPy + Apache2 - Response cached
I'm trying to develop a CherryPy based system.
I'm actually using Apache2 web server + mod_python.
I have the next problem:
When I update the code of my cherrypy app, refresh several times the ...
2
votes
2answers
588 views
mod_python unable to locate the web.py module under a virtual environment
I have a small web.py Python application that I would like to serve under Apache using mod_python. The web.py framework, as well as other third-party Python modules the application in question relies ...
2
votes
1answer
813 views
Alternatives to mod_python's CGI handler
I'm looking for the simplest way of using python and SQLAlchemy to produce some XML for a jQuery based HTTP client. Right now I'm using mod_python's CGI handler but I'm unhappy with the fact that I ...
2
votes
2answers
2k views
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 ...
2
votes
2answers
1k views
mod_python Apache configuration
I am having issues with getting my Mod Python to work properly.
I have followed mod_python manual found here
So here is my Apache setup (I am using Virtual Hosts):
<VirtualHost *:80>
...