Ticket #2600: SERVE_DEFAULT_ADMIN_MEDIA.diff

File SERVE_DEFAULT_ADMIN_MEDIA.diff, 1.9 KB (added by adurdin@…, 9 years ago)

patch

  • django/conf/project_template/settings.py

     
    4040# Examples: "http://foo.com/media/", "/media/".
    4141ADMIN_MEDIA_PREFIX = '/media/'
    4242
     43# Whether the django development server should serve admin media from the
     44# contrib/admin/media/ directory
     45SERVE_DEFAULT_ADMIN_MEDIA = True
     46
    4347# Make this unique, and don't share it with anybody.
    4448SECRET_KEY = ''
    4549
  • django/conf/global_settings.py

     
    142142# Examples: "http://foo.com/media/", "/media/".
    143143ADMIN_MEDIA_PREFIX = '/media/'
    144144
     145# Whether the django development server should serve admin media from the
     146# contrib/admin/media/ directory
     147SERVE_DEFAULT_ADMIN_MEDIA = True
     148
    145149# Default e-mail address to use for various automated correspondence from
    146150# the site managers.
    147151DEFAULT_FROM_EMAIL = 'webmaster@localhost'
  • django/core/management.py

     
    10531053        print "Development server is running at http://%s:%s/" % (addr, port)
    10541054        print "Quit the server with %s." % quit_command
    10551055        try:
    1056             run(addr, int(port), AdminMediaHandler(WSGIHandler()))
     1056            handler = WSGIHandler()
     1057            if settings.SERVE_DEFAULT_ADMIN_MEDIA:
     1058                handler = AdminMediaHandler(handler)
     1059            run(addr, int(port), handler)
    10571060        except WSGIServerException, e:
    10581061            # Use helpful error messages instead of ugly tracebacks.
    10591062            ERRORS = {
Back to Top