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:
parent
9a279edc1c
commit
98d3a09338
|
@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue