Opened 19 years ago

Closed 19 years ago

Last modified 17 years ago

#368 closed defect (invalid)

Admin / Main interfaces mix settings after a while under mod_python

Reported by: Boffbowsh Owned by: Adrian Holovaty
Component: Core (Other) Version:
Severity: major Keywords:
Cc: paul.bowsher@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

httpd.conf:

<Location "/i25admin">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE i25.settings.admin
    PythonPath "['/home/i25'] + sys.path"
    PythonDebug On
</Location>

<Location "/i25">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE i25.settings.main
    PythonPath "['/home/i25'] + sys.path"
    PythonDebug On
</Location>

Alias /i25media /home/i25/media
Alias /admin_media /usr/local/django_src/django/conf/admin_media/
<Directory /usr/local/django_src/django/conf/admin_media/>
        Order allow,deny
        Allow from all
</Directory>

Main settings:

<snip db settings>
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = '/home/i25/media/'

# URL that handles the media served from MEDIA_ROOT.
# Example: "http://media.lawrence.com"
MEDIA_URL = '/i25media'

# Make this unique, and don't share it with anybody.
SECRET_KEY = '@ky*9x@$aig=)-1#c4r9z*myk(pwa!3mpfsd77=s1zfy#itk70'

ROOT_URLCONF = 'i25.settings.urls.main'

TEMPLATE_DIRS = (
    '/home/i25/i25/templates',
    '/usr/local/lib/python2.4/site-packages/django/conf/admin_templates',
)

INSTALLED_APPS = (
		'i25.apps.serverquery',
)

Admin settings:

# Django settings for i25 project admin site.

from main import *

TEMPLATE_DIRS = (
    '/usr/local/lib/python2.4/site-packages/django/conf/admin_templates',
    # Put strings here, like "/home/html/django_templates".
)
ROOT_URLCONF = 'i25.settings.urls.admin'
MIDDLEWARE_CLASSES = (
    'django.middleware.sessions.SessionMiddleware',	
    'django.middleware.admin.AdminUserRequired',
    'django.middleware.common.CommonMiddleware',
)

# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/admin_media/'

Steps to reproduce:

  1. Restart apache
  2. Go to the application site (/i25/match/1/server)
  3. Go to the admin site (/i25admin)
  4. Go back to application site, the following error is reported:

Using the URLconf defined in i25.settings.urls.admin, Django tried these URL patterns, in this order:

  • i25admin/

The current URL, 'i25/match/1/server/', didn't match any of these.


This also works the other way on occasion, although I can't work out how to reproduce it. Sometimes, the stylesheet and graphics for the admin interface will disappear. Look at the source to see it's pointing at /media/css/... not /admin_media/css/... . Am running latest version of django and svn update regularly

Running the following packages:

  • apache-2.0.53_1
  • py24-MySQLdb-1.2.0_1
  • python-2.4_1
  • mod_python-3.1.4
  • mysql-client-4.1.10a

PS. How do you do ordered lists on here?

1. Item
2. Item

seems to not work

Change History (1)

comment:1 by Adrian Holovaty, 19 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top