Setting up mod_python for Django via a .htaccess file
|Reported by:||mm@…||Owned by:||adrian|
|Severity:||normal||Keywords:||mod_python, Apache, .htaccess|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
In How to use Django with mod_python is described how someone could set up django for use with Apache and mod_python.
That works good, if you have a Apache setup like these described there. I have another setup (hint: all is done via mod_vhost_alias, which dynamically search the appropriate folder for the given domain itself, so for example a subdomain is created as simply as create a new folder at the right place in the filesystem) and while I thought about how to get django work altough, I asked myself "why dont use .htaccess?"
TurboGears does that, and it works great, but as I tried for django it doesnt work. Other people seem to have same problems. A few minutes ago in the #django IRC channel:
'''Pistahh:''' mpathy: few months ago I did not have success with .htaccess+django '''Pistahh:''' mpathy: I had mysterious errors
I set the priority to high, because I think handling the Apache configuration via a external file, placed in the folder of the project, is much more flexible than any other ways to setup Apache.
Its also feels a little bit more django for me, than fumbling on these and that - and it also could be simply generated from django in further versions.
But before I get too verbose for a ticket, just a few questions:
- Why it doesnt work?
- Would it be hard to tweak django that it works with .htaccess files instead of modifiying the apache confs?
- Dont you think it would be great (if it finally works with django) to include a .htaccess file to the files that are generated if a new project starts, or make django-admin script able to generate a .htaccess file for the project?
- What other possibilities would I have to use django with a Apache + mod_python + mod_vhost_alias - setup?
I would really appreciate a working .htaccess support (and perhaps our company would donate sth. if I tell them what the oppurtunities would be for us *g*) in django!!