Opened 14 years ago

Closed 14 years ago

Last modified 12 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



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

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

Main settings:

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

# URL that handles the media served from MEDIA_ROOT.
# Example: ""
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'



Admin settings:

# Django settings for i25 project admin site.

from main import *

    # Put strings here, like "/home/html/django_templates".
ROOT_URLCONF = 'i25.settings.urls.admin'

# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "", "/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 Changed 14 years ago by Adrian Holovaty

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