Ticket #19291: 19291.patch

File 19291.patch, 4.0 KB (added by Aymeric Augustin, 11 years ago)
  • django/conf/__init__.py

    diff --git a/django/conf/__init__.py b/django/conf/__init__.py
    index dec4cf9..b00c8d5 100644
    a b class BaseSettings(object):  
    110110    def __setattr__(self, name, value):
    111111        if name in ("MEDIA_URL", "STATIC_URL") and value and not value.endswith('/'):
    112112            raise ImproperlyConfigured("If set, %s must end with a slash" % name)
    113         elif name == "ADMIN_MEDIA_PREFIX":
    114             warnings.warn("The ADMIN_MEDIA_PREFIX setting has been removed; "
    115                           "use STATIC_URL instead.", DeprecationWarning)
    116113        elif name == "ALLOWED_INCLUDE_ROOTS" and isinstance(value, six.string_types):
    117114            raise ValueError("The ALLOWED_INCLUDE_ROOTS setting must be set "
    118115                "to a tuple, not a string.")
  • deleted file django/contrib/admin/templatetags/adminmedia.py

    diff --git a/django/contrib/admin/templatetags/adminmedia.py b/django/contrib/admin/templatetags/adminmedia.py
    deleted file mode 100644
    index b08d13c..0000000
    + -  
    1 import warnings
    2 from django.template import Library
    3 from django.templatetags.static import PrefixNode
    4 
    5 register = Library()
    6 
    7 @register.simple_tag
    8 def admin_media_prefix():
    9     """
    10     Returns the string contained in the setting ADMIN_MEDIA_PREFIX.
    11     """
    12     warnings.warn(
    13         "The admin_media_prefix template tag is deprecated. "
    14         "Use the static template tag instead.", DeprecationWarning)
    15     return PrefixNode.handle_simple("ADMIN_MEDIA_PREFIX")
  • docs/internals/deprecation.txt

    diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
    index 9fd92db..414da30 100644
    a b these changes.  
    140140  removed.  In its place use
    141141  :class:`~django.contrib.staticfiles.handlers.StaticFilesHandler`.
    142142
     143* The template tags library ``adminmedia`` and the template tag ``{%
     144  admin_media_prefix %}`` will be removed in favor of the generic static files
     145  handling. (This is faster than the usual deprecation path; see the
     146  :doc:`Django 1.4 release notes</releases/1.4>`.)
     147
    143148* The :ttag:`url` and :ttag:`ssi` template tags will be
    144149  modified so that the first argument to each tag is a template variable, not
    145150  an implied string. In 1.4, this behavior is provided by a version of the tag
    these changes.  
    232237  :setting:`LOGGING` setting should include this filter explicitly if
    233238  it is desired.
    234239
    235 * The template tag
    236   :func:`django.contrib.admin.templatetags.adminmedia.admin_media_prefix`
    237   will be removed in favor of the generic static files handling.
    238 
    239240* The builtin truncation functions :func:`django.utils.text.truncate_words`
    240241  and :func:`django.utils.text.truncate_html_words` will be removed in
    241242  favor of the ``django.utils.text.Truncator`` class.
  • docs/ref/settings.txt

    diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
    index 5544c99..9b222bf 100644
    a b The default value for the X-Frame-Options header used by  
    22102210Deprecated settings
    22112211===================
    22122212
    2213 .. setting:: ADMIN_MEDIA_PREFIX
    2214 
    2215 ADMIN_MEDIA_PREFIX
    2216 ------------------
    2217 
    2218 .. deprecated:: 1.4
    2219    This setting has been obsoleted by the ``django.contrib.staticfiles`` app
    2220    integration. See the :doc:`Django 1.4 release notes</releases/1.4>` for
    2221    more information.
    2222 
    22232213.. setting:: AUTH_PROFILE_MODULE
    22242214
    22252215AUTH_PROFILE_MODULE
  • docs/releases/1.5.txt

    diff --git a/docs/releases/1.5.txt b/docs/releases/1.5.txt
    index c53518f..cffc0f2 100644
    a b Miscellaneous  
    574574  HTML validation against pre-HTML5 Strict DTDs, you should add a div around it
    575575  in your pages.
    576576
     577* The template tags library ``adminmedia``, which only contained the
     578  deprecated template tag ``{% admin_media_prefix %}``, was removed.
     579  Attempting to load it with ``{% load adminmedia %}`` will fail. If your
     580  templates still contain that line you must remove it.
     581
    577582Features deprecated in 1.5
    578583==========================
    579584
Back to Top