      Common logic for settings whether set by a module or by the user.
      """
      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)
          elif name == "ADMIN_MEDIA_PREFIX":
              warnings.warn("The ADMIN_MEDIA_PREFIX setting has been removed; "
                            "use STATIC_URL instead.", DeprecationWarning)
          elif name == "ALLOWED_INCLUDE_ROOTS" and isinstance(value, basestring):
              raise ValueError("The ALLOWED_INCLUDE_ROOTS setting must be set "
 
</s> remove         MEDIA_URL raises an DeprecationWarning error if it doesn't end in a
        slash.
 </s> add         MEDIA_URL and STATIC_URL raise an ImproperlyConfigured exception
        if they doesn't end in a slash. </s> remove         import warnings
        warnings.filterwarnings('error', 'If set, MEDIA_URL must end with a slash', DeprecationWarning)

 </s> add  </s> remove         self.assertRaises(DeprecationWarning, setattr_settings,
 </s> add         self.assertRaises(ImproperlyConfigured, setattr_settings, </s> remove         self.assertRaises(DeprecationWarning, setattr_settings,
 </s> add         self.assertRaises(ImproperlyConfigured, setattr_settings,
            raise ImproperlyConfigured("If set, %s must end with a slash" % name)
      Common logic for settings whether set by a module or by the user.
      """
      def __setattr__(self, name, value):
          if name in ("MEDIA_URL", "STATIC_URL") and value and not value.endswith('/'):
            raise ImproperlyConfigured("If set, %s must end with a slash" % name)
            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)
          elif name == "ALLOWED_INCLUDE_ROOTS" and isinstance(value, basestring):
              raise ValueError("The ALLOWED_INCLUDE_ROOTS setting must be set "
keep keep keep keep replace replace keep keep keep keep keep
 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