Formatting fixes from the past round of checkins
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4052 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
6f164ad485
commit
a84404c190
|
@ -101,7 +101,7 @@ DATABASE_USER = '' # Not used with sqlite3.
|
|||
DATABASE_PASSWORD = '' # Not used with sqlite3.
|
||||
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
|
||||
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
|
||||
DATABASE_OPTIONS = {} # Set to empy dictionary for default.
|
||||
DATABASE_OPTIONS = {} # Set to empty dictionary for default.
|
||||
|
||||
# Host for sending e-mail.
|
||||
EMAIL_HOST = 'localhost'
|
||||
|
|
|
@ -6,8 +6,6 @@ __all__ = ('backend', 'connection', 'DatabaseError')
|
|||
|
||||
if not settings.DATABASE_ENGINE:
|
||||
settings.DATABASE_ENGINE = 'dummy'
|
||||
if not settings.DATABASE_OPTIONS:
|
||||
settings.DATABASE_OPTIONS = {}
|
||||
|
||||
try:
|
||||
backend = __import__('django.db.backends.%s.base' % settings.DATABASE_ENGINE, {}, {}, [''])
|
||||
|
|
|
@ -657,9 +657,9 @@ def ifchanged(parser, token):
|
|||
<a href="{{ date|date:"M/d"|lower }}/">{{ date|date:"j" }}</a>
|
||||
{% endfor %}
|
||||
|
||||
2. If given a variable, check if that variable has changed. For example, the
|
||||
2. If given a variable, check whether that variable has changed. For example, the
|
||||
following shows the date every time it changes, but only shows the hour if both
|
||||
the hour and the date has changed::
|
||||
the hour and the date have changed::
|
||||
|
||||
{% for date in days %}
|
||||
{% ifchanged date.date %} {{ date.date }} {% endifchanged %}
|
||||
|
|
|
@ -611,13 +611,13 @@ fails. If no message is passed in, a default message is used.
|
|||
string comparison here, you will need to write your own validator.
|
||||
|
||||
``NumberIsInRange``
|
||||
Takes two boundary number, ``lower`` and ``upper`` and checks that the
|
||||
Takes two boundary numbers, ``lower`` and ``upper``, and checks that the
|
||||
field is greater than ``lower`` (if given) and less than ``upper`` (if
|
||||
given).
|
||||
|
||||
Both checks are inclusive; that is, ``NumberIsInRange(10, 20)`` will allow
|
||||
values of both 10 and 20. This validator only checks numeric fields
|
||||
(i.e. floats and integer fields).
|
||||
Both checks are inclusive. That is, ``NumberIsInRange(10, 20)`` will allow
|
||||
values of both 10 and 20. This validator only checks numeric values
|
||||
(e.g., float and integer values).
|
||||
|
||||
``IsAPowerOf``
|
||||
Takes an integer argument and when called as a validator, checks that the
|
||||
|
|
|
@ -538,9 +538,9 @@ The 'ifchanged' block tag is used within a loop. It has two possible uses.
|
|||
<a href="{{ date|date:"M/d"|lower }}/">{{ date|date:"j" }}</a>
|
||||
{% endfor %}
|
||||
|
||||
2. If given a variable, check if that variable has changed. For example, the
|
||||
following shows the date every time it changes, but only shows the hour if both
|
||||
the hour and the date has changed::
|
||||
2. **New in Django development version.** If given a variable, check whether that
|
||||
variable has changed. For example, the following shows the date every time it
|
||||
changes, but only shows the hour if both the hour and the date has changed::
|
||||
|
||||
{% for date in days %}
|
||||
{% ifchanged date.date %} {{ date.date }} {% endifchanged %}
|
||||
|
|
Loading…
Reference in New Issue