mod-python

How to setup and run Python on Wampserver?

一世执手 提交于 2019-12-04 02:11:45
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. I've tried it but i belive i am having conflict when it comes to versions. Does anyone know of a cobination of versions that can work so that i can do some local python development using my wampserver? Links to the download would be greatly appreciated. My current config: Wampserver 2.0c => Apache Version : 2.2.8 , PHP Version : 5.2.6 , MySQL Version : 5.0.51b Do not use mod_python ; it does not do

Django newbie deployment question - ImportError: Could not import settings 'settings'

我怕爱的太早我们不能终老 提交于 2019-12-03 16:14:21
问题 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 __init__ raise ImportError, "Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e) ImportError: Could not import settings 'settings' (Is it on sys.path? Does it have syntax errors?): No module named settings Here is the needed information 1)

A good multithreaded python webserver?

≡放荡痞女 提交于 2019-12-03 10:56:31
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 object cache that will be used by various http threads. My webserver does a lot of expensive stuff and computes some large arrays which needs to be cached in memory for future use to avoid recomputing. This is not possible in a multi-process web server environment. Storing this information in memcache is also not a good idea as the arrays are large and storing them in memcache would lead to

Django Apache/mod_python Admin CSS not appearing with admin tables

有些话、适合烂在心里 提交于 2019-12-03 07:12:14
问题 I have Windows XP/Django/apache/mod_python working on localhost. All parts are working with the exception of the admin CSS not rendering. The admin works, but no html formatting. I've made additions in: settings.py INSTALLED_APPS 'django.contrib.admin', urls.py from django.contrib import admin admin.autodiscover() (r'^admin/(.*)', admin.site.root), conf/http.conf <Location "/"> SetHandler python-program PythonPath "['C:/django'] + sys.path" PythonHandler django.core.handlers.modpython SetEnv

Django newbie deployment question - ImportError: Could not import settings 'settings'

天大地大妈咪最大 提交于 2019-12-03 06:21:13
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 __init__ raise ImportError, "Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e) ImportError: Could not import settings 'settings' (Is it on sys.path? Does it have syntax errors?): No module named settings Here is the needed information 1) Project directory: /root/djangoprojects/mysite 2) directory listing of /root/djangoprojects/mysite ls -ltr

Python for web development in Apache [closed]

♀尐吖头ヾ 提交于 2019-12-03 05:10:00
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I've been playing with mod_python in apache2 which seems to work differently than python does in general - there's a bit different

Serving static files with mod_wsgi and Django

ぐ巨炮叔叔 提交于 2019-12-03 02:52:09
问题 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 to test and maybe deploy with mod_wsgi but I cannot figure out how to create something simple to serve static files. mod_python allows the use of Apache directives like: <Location '/'> SetHandler MyApplication.xyz..... </Location> <Location '/media'> SetHandler None </Location> The django docs

Django Apache/mod_python Admin CSS not appearing with admin tables

孤街浪徒 提交于 2019-12-02 20:44:25
I have Windows XP/Django/apache/mod_python working on localhost. All parts are working with the exception of the admin CSS not rendering. The admin works, but no html formatting. I've made additions in: settings.py INSTALLED_APPS 'django.contrib.admin', urls.py from django.contrib import admin admin.autodiscover() (r'^admin/(.*)', admin.site.root), conf/http.conf <Location "/"> SetHandler python-program PythonPath "['C:/django'] + sys.path" PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE mysite.settings PythonDebug On </Location> <Location "/cpssite/"> SetHandler

Error while deploying Django on Apache

房东的猫 提交于 2019-12-02 03:24:46
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 in the documentation and after some fiddling, came out with the following in my httpd.conf. <Location "/therap/"> SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE settings PythonOption django.root /therap PythonDebug On PythonPath "['D:/therap/therap'] + sys.path" </Location> MaxRequestsPerChild 1 D:

Setting up Python on Windows/ Apache?

守給你的承諾、 提交于 2019-11-30 04:17:49
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 sure what I'm supposed to do in e.g. http.conf (things like AddHandler mod_python .py either bring me to a file not found, or a forbidden, or module not found errors when accessing http://localhost/myfolder/index.py ). I can get mod_python.publisher to work but do I "want" this/ need this? Can anyone help? Thanks! Stay away from mod_python . One common misleading idea is that mod_python is like mod