1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #21221 -- Made form Media and static template tag use staticfiles if installed.

This commit is contained in:
Johannes Hoppe
2015-11-07 12:24:38 +01:00
committed by Tim Graham
parent 6be9589eb3
commit cf546e11ac
34 changed files with 145 additions and 144 deletions

View File

@@ -127,7 +127,11 @@ Minor features
:mod:`django.contrib.staticfiles`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* ...
* The :ttag:`static` template tag now uses ``django.contrib.staticfiles``
if it's in ``INSTALLED_APPS``. This is especially useful for third-party apps
which can now always use ``{% load static %}`` (instead of
``{% load staticfiles %}`` or ``{% load static from staticfiles %}``) and
not worry about whether or not the ``staticfiles`` app is installed.
:mod:`django.contrib.syndication`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -169,7 +173,8 @@ File Uploads
Forms
^^^^^
* ...
* Form and widget ``Media`` is now served using
:mod:`django.contrib.staticfiles` if installed.
Generic Views
^^^^^^^^^^^^^

View File

@@ -459,10 +459,10 @@ more details.
~~~~~~~~~~~~~~~~~~~~~~~
The :mod:`staticfiles<django.contrib.staticfiles>` contrib app has a new
:ttag:`static<staticfiles-static>` template tag to refer to files saved with
the :setting:`STATICFILES_STORAGE` storage backend. It uses the storage
backend's ``url`` method and therefore supports advanced features such as
:ref:`serving files from a cloud service<staticfiles-from-cdn>`.
``static`` template tag to refer to files saved with the
:setting:`STATICFILES_STORAGE` storage backend. It uses the storage backend's
``url`` method and therefore supports advanced features such as :ref:`serving
files from a cloud service<staticfiles-from-cdn>`.
``CachedStaticFilesStorage`` storage backend
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~