Changeset 4052
- Timestamp:
- 11/07/06 13:07:27 (2 years ago)
- Files:
-
- django/trunk/django/conf/global_settings.py (modified) (1 diff)
- django/trunk/django/core/mail.py (modified) (1 diff)
- django/trunk/django/db/__init__.py (modified) (1 diff)
- django/trunk/django/template/defaulttags.py (modified) (1 diff)
- django/trunk/docs/forms.txt (modified) (1 diff)
- django/trunk/docs/templates.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/conf/global_settings.py
r4048 r4052 102 102 DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. 103 103 DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. 104 DATABASE_OPTIONS = {} # Set to emp y dictionary for default.104 DATABASE_OPTIONS = {} # Set to empty dictionary for default. 105 105 106 106 # Host for sending e-mail. django/trunk/django/core/mail.py
r4051 r4052 54 54 msg['To'] = ', '.join(recipient_list) 55 55 msg['Date'] = rfc822.formatdate() 56 msg['Message-ID'] = "<%d.%d@%s>" % ( time.time(), random.getrandbits(64), socket.getfqdn())56 msg['Message-ID'] = "<%d.%d@%s>" % (time.time(), random.getrandbits(64), socket.getfqdn()) 57 57 try: 58 58 server.sendmail(from_email, recipient_list, msg.as_string()) django/trunk/django/db/__init__.py
r4048 r4052 7 7 if not settings.DATABASE_ENGINE: 8 8 settings.DATABASE_ENGINE = 'dummy' 9 if not settings.DATABASE_OPTIONS:10 settings.DATABASE_OPTIONS = {}11 9 12 10 try: django/trunk/django/template/defaulttags.py
r4050 r4052 658 658 {% endfor %} 659 659 660 2. If given a variable, check ifthat variable has changed. For example, the660 2. If given a variable, check whether that variable has changed. For example, the 661 661 following shows the date every time it changes, but only shows the hour if both 662 the hour and the date ha schanged::662 the hour and the date have changed:: 663 663 664 664 {% for date in days %} 665 {% ifchanged date.date %} {{ date.date}} {% endifchanged %}665 {% ifchanged date.date %} {{ date.date }} {% endifchanged %} 666 666 {% ifchanged date.hour date.date %} 667 {{ date.hour}}667 {{ date.hour }} 668 668 {% endifchanged %} 669 669 {% endfor %} django/trunk/docs/forms.txt
r4039 r4052 612 612 613 613 ``NumberIsInRange`` 614 Takes two boundary number , ``lower`` and ``upper``and checks that the614 Takes two boundary numbers, ``lower`` and ``upper``, and checks that the 615 615 field is greater than ``lower`` (if given) and less than ``upper`` (if 616 616 given). 617 617 618 Both checks are inclusive ; that is, ``NumberIsInRange(10, 20)`` will allow619 values of both 10 and 20. This validator only checks numeric fields620 ( i.e. floats and integer fields).618 Both checks are inclusive. That is, ``NumberIsInRange(10, 20)`` will allow 619 values of both 10 and 20. This validator only checks numeric values 620 (e.g., float and integer values). 621 621 622 622 ``IsAPowerOf`` django/trunk/docs/templates.txt
r4050 r4052 539 539 {% endfor %} 540 540 541 2. If given a variable, check if that variable has changed. For example, the542 following shows the date every time it changes, but only shows the hour if both543 the hour and the date has changed::541 2. **New in Django development version.** If given a variable, check whether that 542 variable has changed. For example, the following shows the date every time it 543 changes, but only shows the hour if both the hour and the date has changed:: 544 544 545 545 {% for date in days %} 546 {% ifchanged date.date %} {{ date.date}} {% endifchanged %}546 {% ifchanged date.date %} {{ date.date }} {% endifchanged %} 547 547 {% ifchanged date.hour date.date %} 548 {{ date.hour}}548 {{ date.hour }} 549 549 {% endifchanged %} 550 550 {% endfor %}
