Advanced deprecation for MEDIA_URL and STATIC_URL without a trailing slash.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15969 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2011-04-02 08:32:21 +00:00
parent 9a279edc1c
commit 98d3a09338
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ class BaseSettings(object):
def __setattr__(self, name, value): def __setattr__(self, name, value):
if name in ("MEDIA_URL", "STATIC_URL") and value and not value.endswith('/'): if name in ("MEDIA_URL", "STATIC_URL") and value and not value.endswith('/'):
warnings.warn('If set, %s must end with a slash' % name, warnings.warn('If set, %s must end with a slash' % name,
PendingDeprecationWarning) DeprecationWarning)
object.__setattr__(self, name, value) object.__setattr__(self, name, value)