diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2007-03-29 11:43:24 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2007-03-29 11:43:24 +0000 |
| commit | 5f68a26ff4eceaa46a6963184bb80d136d207828 (patch) | |
| tree | 579310cadb98e4064f15798b82ca5cb5d1dd049f /docs | |
| parent | 1f0b1afbfe2e40fe63da7b4f6a9621660ee1f4a0 (diff) | |
Fixes #3799 -- Oops - ran last checkin from the wrong directory. Checked in the rest of the lorem templatetag implementation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4848 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/templates.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/docs/templates.txt b/docs/templates.txt index 8ab383c461..36da8dff07 100644 --- a/docs/templates.txt +++ b/docs/templates.txt @@ -625,6 +625,31 @@ Load a custom template tag set. See `Custom tag and filter libraries`_ for more information. +lorem +~~~~~ + +Display random latin text useful for providing sample data in templates. + +Usage format: ``{% lorem [count] [method] [random] %}`` + + =========== ============================================================= + 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. + now ~~~ |
