Rolled a number of comments into documentation; thanks to all those who contributed.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@283 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
96d69c5b5f
commit
18749c0060
|
@ -20,7 +20,8 @@ far the fastest option if you've got the RAM).
|
||||||
Before using the cache, you'll need to tell Django which cache backend you'd
|
Before using the cache, you'll need to tell Django which cache backend you'd
|
||||||
like to use. Do this by setting the ``CACHE_BACKEND`` in your settings file.
|
like to use. Do this by setting the ``CACHE_BACKEND`` in your settings file.
|
||||||
|
|
||||||
The CACHE_BACKEND setting is a quasi-URI. Examples::
|
The CACHE_BACKEND setting is a "fake" URI (really an unregistered scheme).
|
||||||
|
Examples:
|
||||||
|
|
||||||
============================== ===========================================
|
============================== ===========================================
|
||||||
CACHE_BACKEND Explanation
|
CACHE_BACKEND Explanation
|
||||||
|
|
|
@ -278,7 +278,7 @@ Field Types
|
||||||
.. _`strftime formatting`: http://docs.python.org/lib/module-time.html#l2h-1941
|
.. _`strftime formatting`: http://docs.python.org/lib/module-time.html#l2h-1941
|
||||||
|
|
||||||
``FloatField``
|
``FloatField``
|
||||||
A floating-point number. Has two required arguments:
|
A floating-point number. Has two **required** arguments:
|
||||||
|
|
||||||
====================== ===================================================
|
====================== ===================================================
|
||||||
Argument Description
|
Argument Description
|
||||||
|
|
|
@ -40,6 +40,14 @@ template. Each element will be explained later in this document.::
|
||||||
<p>{{ story.tease|truncatewords:"100" }}</p>
|
<p>{{ story.tease|truncatewords:"100" }}</p>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
.. admonition:: Philosophy
|
||||||
|
|
||||||
|
Why use a text-based template instead of an XML-based one (like Zope's
|
||||||
|
TAL)? We wanted Django's template language to be usable for more than
|
||||||
|
just XML/HTML templates -- at the Journal-World we use it for emails,
|
||||||
|
Javascript, CSV -- you can use the template language for any text-based
|
||||||
|
format.
|
||||||
|
|
||||||
What's a variable?
|
What's a variable?
|
||||||
==================
|
==================
|
||||||
|
@ -198,7 +206,7 @@ Here are some tips for working with inheritance:
|
||||||
|
|
||||||
* We often prefer to use three-level inheritance: a single base template
|
* We often prefer to use three-level inheritance: a single base template
|
||||||
for the entire site, a set of mid-level templates for each section of
|
for the entire site, a set of mid-level templates for each section of
|
||||||
the site, and then the individual templates for each page. This
|
the site, and then the individual templates for each view. This
|
||||||
maximizes code reuse, and makes it easier to add items to shared
|
maximizes code reuse, and makes it easier to add items to shared
|
||||||
content areas (like section-wide navigation).
|
content areas (like section-wide navigation).
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue