Ticket #2891: 2891.2.patch

File 2891.2.patch, 3.6 KB (added by Chris Beaven, 17 years ago)
  • django/conf/global_settings.py

     
    157157
    158158# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
    159159# trailing slash.
    160 # Examples: "http://foo.com/media/", "/media/".
     160# Examples: "http://foo.com/admin_media/", "/admin_media/".
     161# The default in project_template/settings.py is now '/admin_media/', but the
     162# default here has been left as '/media/' for backwards compatibility.
    161163ADMIN_MEDIA_PREFIX = '/media/'
    162164
    163165# Default e-mail address to use for various automated correspondence from
  • django/conf/project_template/settings.py

     
    4444
    4545# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
    4646# trailing slash.
    47 # Examples: "http://foo.com/media/", "/media/".
    48 ADMIN_MEDIA_PREFIX = '/media/'
     47# Examples: "http://foo.com/admin_media/", "/admin_media/".
     48ADMIN_MEDIA_PREFIX = '/admin_media/'
    4949
    5050# Make this unique, and don't share it with anybody.
    5151SECRET_KEY = ''
  • django/contrib/admin/templatetags/admin_modify.py

     
    2828
    2929    could return::
    3030
    31         <script type="text/javascript" src="/media/admin/js/calendar.js">
     31        <script type="text/javascript" src="/admin_media/admin/js/calendar.js">
    3232    """
    3333    if not absolute_url_re.match(script_path):
    3434        script_path = '%s%s' % (settings.ADMIN_MEDIA_PREFIX, script_path)
  • docs/fastcgi.txt

     
    195195directive, as explained in the previous section).
    196196
    197197In this example, we tell Apache to use FastCGI to handle any request that
    198 doesn't represent a file on the filesystem and doesn't start with ``/media/``.
    199 This is probably the most common case, if you're using Django's admin site::
     198doesn't represent a file on the filesystem and doesn't start with
     199``/admin_media/``. This is probably the most common case, if you're using
     200Django's admin site::
    200201
    201202    <VirtualHost 12.34.56.78>
    202203      ServerName example.com
    203204      DocumentRoot /home/user/public_html
    204       Alias /media /home/user/python/django/contrib/admin/media
     205      Alias /admin_media /home/user/python/django/contrib/admin/media
    205206      RewriteEngine On
    206207      RewriteRule ^/(media.*)$ /$1 [QSA,L,PT]
    207208      RewriteCond %{REQUEST_FILENAME} !-f
     
    236237        ),
    237238    )
    238239    alias.url = (
    239         "/media/" => "/home/user/django/contrib/admin/media/",
     240        "/admin_media/" => "/home/user/django/contrib/admin/media/",
    240241    )
    241242
    242243    url.rewrite-once = (
  • docs/settings.txt

     
    188188The URL prefix for admin media -- CSS, JavaScript and images. Make sure to use
    189189a trailing slash.
    190190
     191Note that the default in a ``settings.py`` file created with
     192`django-admin.py startproject`_ is ``'/admin_media/'`` (the fall-back default
     193remains ``'/media/'`` for backwards compatibility).
     194
     195.. _django-admin.py startproject: ../django-admin/#startproject-projectname
     196
    191197ADMINS
    192198------
    193199
Back to Top