> A small, recreatable example would help.
I've just recreated by doing the following, all with Django 1.1:
1. Run django-admin startproject bug
2. Set DATABASE_ENGINE to sqlite3 and DATABASE_NAME to /tmp/bug-
database
3. Add 'django.contrib.admin' to INSTALLED_APPS
4. Edit urls.py so that it looks like this:
from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
)
5. Run manage.py startapp blog
6. Edit models.py so it looks like this:
from django.db import models
from django.contrib import admin
class Tag(models.Model):
name = models.CharField(max_length=50)
admin.site.register(Tag)
7. Add 'bug.blog' to INSTALLED_APPS
8. Run manage.py syncdb
9. Add a VirtualHost to apache2:
<VirtualHost *:8426>
DocumentRoot /var/www/django-admin-bug/public
<Directory "/var/www/django-admin-bug/public">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
10. Put the following .htaccess in /var/www/django-admin-bug/public:
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE bug.settings
PythonOption django.root
PythonDebug On
PythonPath "['/var/www/django-admin-bug'] + sys.path"
11. Set DEBUG=False
12. Try to add a tag, and get a 404.
When running the application using manage.py runserver, the bug
disappears, so it seems mod_python is doing something differently.