mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #11185 - Expanded docs on customizing widgets; thanks fadeev for the draft patch.
This commit is contained in:
parent
65793d714c
commit
a73838fde3
3 changed files with 214 additions and 78 deletions
|
@ -38,6 +38,8 @@ in a form suitable for easy inclusion on your Web page.
|
|||
whichever toolkit suits your requirements. Django is able to integrate
|
||||
with any JavaScript toolkit.
|
||||
|
||||
.. _media-as-a-static-definition:
|
||||
|
||||
Media as a static definition
|
||||
----------------------------
|
||||
|
||||
|
@ -78,10 +80,8 @@ A dictionary describing the CSS files required for various forms of output
|
|||
media.
|
||||
|
||||
The values in the dictionary should be a tuple/list of file names. See
|
||||
`the section on media paths`_ for details of how to specify paths to media
|
||||
files.
|
||||
|
||||
.. _the section on media paths: `Paths in media definitions`_
|
||||
:ref:`the section on media paths <form-media-paths>` for details of how to
|
||||
specify paths to media files.
|
||||
|
||||
The keys in the dictionary are the output media types. These are the same
|
||||
types accepted by CSS files in media declarations: 'all', 'aural', 'braille',
|
||||
|
@ -117,8 +117,8 @@ If this last CSS definition were to be rendered, it would become the following H
|
|||
``js``
|
||||
~~~~~~
|
||||
|
||||
A tuple describing the required JavaScript files. See
|
||||
`the section on media paths`_ for details of how to specify paths to media
|
||||
A tuple describing the required JavaScript files. See :ref:`the section on
|
||||
media paths <form-media-paths>` for details of how to specify paths to media
|
||||
files.
|
||||
|
||||
``extend``
|
||||
|
@ -164,10 +164,10 @@ declaration to the media declaration::
|
|||
<script type="text/javascript" src="http://static.example.com/whizbang.js"></script>
|
||||
|
||||
If you require even more control over media inheritance, define your media
|
||||
using a `dynamic property`_. Dynamic properties give you complete control over
|
||||
which media files are inherited, and which are not.
|
||||
using a :ref:`dynamic property <dynamic-property>`. Dynamic properties give
|
||||
you complete control over which media files are inherited, and which are not.
|
||||
|
||||
.. _dynamic property: `Media as a dynamic property`_
|
||||
.. _dynamic-property:
|
||||
|
||||
Media as a dynamic property
|
||||
---------------------------
|
||||
|
@ -198,9 +198,9 @@ Paths in media definitions
|
|||
.. versionchanged:: 1.3
|
||||
|
||||
Paths used to specify media can be either relative or absolute. If a path
|
||||
starts with '/', 'http://' or 'https://', it will be interpreted as an absolute
|
||||
path, and left as-is. All other paths will be prepended with the value of
|
||||
the appropriate prefix.
|
||||
starts with ``/``, ``http://`` or ``https://``, it will be interpreted as an
|
||||
absolute path, and left as-is. All other paths will be prepended with the value
|
||||
of the appropriate prefix.
|
||||
|
||||
As part of the introduction of the
|
||||
:doc:`staticfiles app </ref/contrib/staticfiles>` two new settings were added
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue