Skip to content
Browse files

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: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 33d8fcd commit 96af304747b4edd6180613bfabe98bac7c8cfdeb @jezdez jezdez committed
Showing with 5 additions and 0 deletions.
  1. +5 −0 django/core/servers/
5 django/core/servers/
@@ -650,6 +650,11 @@ def get_base_dir(self):
def get_base_url(self):
from django.conf import settings
+ from django.core.exceptions import ImproperlyConfigured
+ if not settings.ADMIN_MEDIA_PREFIX:
+ raise ImproperlyConfigured(
+ "The ADMIN_MEDIA_PREFIX setting can't be empty "
+ "when using the AdminMediaHandler, e.g. with runserver.")
return settings.ADMIN_MEDIA_PREFIX
def file_path(self, url):

0 comments on commit 96af304

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