diff options
| author | Tim Graham <timograham@gmail.com> | 2014-07-12 09:50:27 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-07-14 08:45:19 -0400 |
| commit | 38e001ab6caa8e5da68dbefd17322adcd2603c21 (patch) | |
| tree | 6512aacff04c7593ec699dd570940eb0eba4eae6 /docs/ref | |
| parent | 7affb4ad58e7ee93e4cca0c350315c63035ed648 (diff) | |
Fixed #22789 -- Deprecated django.contrib.webdesign.
Moved the {% lorem %} tag to built-in tags.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/contrib/webdesign.txt | 50 | ||||
| -rw-r--r-- | docs/ref/templates/builtins.txt | 38 |
2 files changed, 41 insertions, 47 deletions
diff --git a/docs/ref/contrib/webdesign.txt b/docs/ref/contrib/webdesign.txt index 0e739484b9..f3c8ebe402 100644 --- a/docs/ref/contrib/webdesign.txt +++ b/docs/ref/contrib/webdesign.txt @@ -6,51 +6,7 @@ django.contrib.webdesign :synopsis: Helpers and utilities targeted primarily at Web *designers* rather than Web *developers*. -The ``django.contrib.webdesign`` package, part of the -:doc:`"django.contrib" add-ons </ref/contrib/index>`, provides various Django -helpers that are particularly useful to Web *designers* (as opposed to -developers). +.. deprecated:: 1.8 -At present, the package contains only a single template tag. If you have ideas -for Web-designer-friendly functionality in Django, please -:doc:`suggest them </internals/contributing/index>`. - -Template tags -============= - -To use these template tags, add ``'django.contrib.webdesign'`` to your -:setting:`INSTALLED_APPS` setting. Once you've done that, use -``{% load webdesign %}`` in a template to give your template access to the tags. - - -lorem -===== - -Displays random "lorem ipsum" Latin text. This is useful for providing sample -data in templates. - -Usage:: - - {% lorem [count] [method] [random] %} - -The ``{% lorem %}`` tag can be used with zero, one, two or three arguments. -The arguments are: - -=========== ============================================================= -Argument Description -=========== ============================================================= -``count`` A number (or variable) containing the number of paragraphs or - words to generate (default is 1). -``method`` Either ``w`` for words, ``p`` for HTML paragraphs or ``b`` - for plain-text paragraph blocks (default is ``b``). -``random`` The word ``random``, which if given, does not use the common - paragraph ("Lorem ipsum dolor sit amet...") when generating - text. -=========== ============================================================= - -Examples: - -* ``{% lorem %}`` will output the common "lorem ipsum" paragraph. -* ``{% lorem 3 p %}`` will output the common "lorem ipsum" paragraph - and two random paragraphs each wrapped in HTML ``<p>`` tags. -* ``{% lorem 2 w random %}`` will output two random Latin words. + The package contained only a single template tag and it has been moved + to the built-in tags (:ttag:`lorem`). diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 97860d1463..242f2c2c9a 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -726,6 +726,44 @@ and ``bar`` will be loaded from ``somelibrary``:: See :doc:`Custom tag and filter libraries </howto/custom-template-tags>` for more information. +.. templatetag:: lorem + +lorem +^^^^^ + +.. versionadded:: 1.8 + + The tag was previously located in :mod:`django.contrib.webdesign`. + +Displays random "lorem ipsum" Latin text. This is useful for providing sample +data in templates. + +Usage:: + + {% lorem [count] [method] [random] %} + +The ``{% lorem %}`` tag can be used with zero, one, two or three arguments. +The arguments are: + +=========== ============================================================= +Argument Description +=========== ============================================================= +``count`` A number (or variable) containing the number of paragraphs or + words to generate (default is 1). +``method`` Either ``w`` for words, ``p`` for HTML paragraphs or ``b`` + for plain-text paragraph blocks (default is ``b``). +``random`` The word ``random``, which if given, does not use the common + paragraph ("Lorem ipsum dolor sit amet...") when generating + text. +=========== ============================================================= + +Examples: + +* ``{% lorem %}`` will output the common "lorem ipsum" paragraph. +* ``{% lorem 3 p %}`` will output the common "lorem ipsum" paragraph + and two random paragraphs each wrapped in HTML ``<p>`` tags. +* ``{% lorem 2 w random %}`` will output two random Latin words. + .. templatetag:: now now |
