From fbfaa35fb0a2a1206221e00c56cf6136cf93b6f1 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sat, 31 Mar 2012 13:01:59 +0000 Subject: Required that the MEDIA_URL and STATIC_URL settings end with a slash, per the deprecation timeline. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17845 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/conf/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'django') diff --git a/django/conf/__init__.py b/django/conf/__init__.py index c81456dd92..0d8f4b6b83 100644 --- a/django/conf/__init__.py +++ b/django/conf/__init__.py @@ -69,8 +69,7 @@ class BaseSettings(object): """ def __setattr__(self, name, value): if name in ("MEDIA_URL", "STATIC_URL") and value and not value.endswith('/'): - warnings.warn("If set, %s must end with a slash" % name, - DeprecationWarning) + raise ImproperlyConfigured("If set, %s must end with a slash" % name) elif name == "ADMIN_MEDIA_PREFIX": warnings.warn("The ADMIN_MEDIA_PREFIX setting has been removed; " "use STATIC_URL instead.", DeprecationWarning) -- cgit v1.3