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/templates | |
| parent | 7affb4ad58e7ee93e4cca0c350315c63035ed648 (diff) | |
Fixed #22789 -- Deprecated django.contrib.webdesign.
Moved the {% lorem %} tag to built-in tags.
Diffstat (limited to 'docs/ref/templates')
| -rw-r--r-- | docs/ref/templates/builtins.txt | 38 |
1 files changed, 38 insertions, 0 deletions
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 |
