Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #10636 -- Added check to make sure the ADMIN_MEDIA_PREFIX setti…

…ng is properly set before serving files with the AdminMediaHandler.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14593 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 96af304747b4edd6180613bfabe98bac7c8cfdeb 1 parent 33d8fcd
Jannis Leidel authored November 17, 2010

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. 5  django/core/servers/basehttp.py
5  django/core/servers/basehttp.py
@@ -650,6 +650,11 @@ def get_base_dir(self):
650 650
 
651 651
     def get_base_url(self):
652 652
         from django.conf import settings
  653
+        from django.core.exceptions import ImproperlyConfigured
  654
+        if not settings.ADMIN_MEDIA_PREFIX:
  655
+            raise ImproperlyConfigured(
  656
+                "The ADMIN_MEDIA_PREFIX setting can't be empty "
  657
+                "when using the AdminMediaHandler, e.g. with runserver.")
653 658
         return settings.ADMIN_MEDIA_PREFIX
654 659
 
655 660
     def file_path(self, url):

0 notes on commit 96af304

Please sign in to comment.
Something went wrong with that request. Please try again.