Changeset 3648
- Timestamp:
- 08/22/06 11:46:32 (2 years ago)
- Files:
-
- django/branches/multiple-db-support/django/contrib/admin/media/css/global.css (modified) (1 diff)
- django/branches/multiple-db-support/django/contrib/admin/templates/admin_doc/model_detail.html (modified) (1 diff)
- django/branches/multiple-db-support/django/core/validators.py (modified) (1 diff)
- django/branches/multiple-db-support/django/views/generic/date_based.py (modified) (3 diffs)
- django/branches/multiple-db-support/docs/settings.txt (modified) (3 diffs)
- django/branches/multiple-db-support/docs/templates.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/multiple-db-support/django/contrib/admin/media/css/global.css
r3427 r3648 1 body { margin:0; padding:0; font-size:12px; font-family:"Lucida Grande"," Bitstream Vera Sans",Verdana,Arial,sans-serif; color:#333; background:#fff; }1 body { margin:0; padding:0; font-size:12px; font-family:"Lucida Grande","DejaVu Sans","Bitstream Vera Sans",Verdana,Arial,sans-serif; color:#333; background:#fff; } 2 2 3 3 /* LINKS */ django/branches/multiple-db-support/django/contrib/admin/templates/admin_doc/model_detail.html
r3355 r3648 36 36 <td>{{ field.name }}</td> 37 37 <td>{{ field.data_type }}</td> 38 <td>{% if field.verbose %}{{ field.verbose |escape }}{% endif %}{% if field.help_text %} - {{ field.help_text|escape}}{% endif %}</td>38 <td>{% if field.verbose %}{{ field.verbose }}{% endif %}{% if field.help_text %} - {{ field.help_text }}{% endif %}</td> 39 39 </tr> 40 40 {% endfor %} django/branches/multiple-db-support/django/core/validators.py
r3355 r3648 69 69 def isSlug(field_data, all_data): 70 70 if not slug_re.search(field_data): 71 raise ValidationError, "This value must contain only letters, numbers, underscores or hyphens."71 raise ValidationError, gettext("This value must contain only letters, numbers, underscores or hyphens.") 72 72 73 73 def isLowerCase(field_data, all_data): django/branches/multiple-db-support/django/views/generic/date_based.py
r3502 r3648 2 2 from django.core.exceptions import ObjectDoesNotExist 3 3 from django.core.xheaders import populate_xheaders 4 from django.db.models.fields import DateTimeField 4 5 from django.http import Http404, HttpResponse 5 6 import datetime, time … … 236 237 now = datetime.datetime.now() 237 238 238 lookup_kwargs = { 239 '%s__range' % date_field: (datetime.datetime.combine(date, datetime.time.min), datetime.datetime.combine(date, datetime.time.max)), 240 } 239 if isinstance(model._meta.get_field(date_field), DateTimeField): 240 lookup_kwargs = {'%s__range' % date_field: (datetime.datetime.combine(date, datetime.time.min), datetime.datetime.combine(date, datetime.time.max))} 241 else: 242 lookup_kwargs = {date_field: date} 241 243 242 244 # Only bother to check current date if the date isn't in the past and future objects aren't requested. … … 305 307 now = datetime.datetime.now() 306 308 307 lookup_kwargs = { 308 '%s__range' % date_field: (datetime.datetime.combine(date, datetime.time.min), datetime.datetime.combine(date, datetime.time.max)), 309 } 309 if isinstance(model._meta.get_field(date_field), DateTimeField): 310 lookup_kwargs = {'%s__range' % date_field: (datetime.datetime.combine(date, datetime.time.min), datetime.datetime.combine(date, datetime.time.max))} 311 else: 312 lookup_kwargs = {date_field: date} 310 313 311 314 # Only bother to check current date if the date isn't in the past and future objects aren't requested. django/branches/multiple-db-support/docs/settings.txt
r3581 r3648 474 474 475 475 LANGUAGES = ( 476 ('ar', _('Arabic')), 476 477 ('bn', _('Bengali')), 477 478 ('cs', _('Czech')), … … 479 480 ('da', _('Danish')), 480 481 ('de', _('German')), 482 ('el', _('Greek')), 481 483 ('en', _('English')), 482 484 ('es', _('Spanish')), 485 ('es_AR', _('Argentinean Spanish')), 483 486 ('fr', _('French')), 484 487 ('gl', _('Galician')), 488 ('hu', _('Hungarian')), 489 ('he', _('Hebrew')), 485 490 ('is', _('Icelandic')), 486 491 ('it', _('Italian')), 492 ('ja', _('Japanese')), 493 ('nl', _('Dutch')), 487 494 ('no', _('Norwegian')), 488 495 ('pt-br', _('Brazilian')), … … 490 497 ('ru', _('Russian')), 491 498 ('sk', _('Slovak')), 499 ('sl', _('Slovenian')), 492 500 ('sr', _('Serbian')), 493 501 ('sv', _('Swedish')), 502 ('ta', _('Tamil')), 503 ('uk', _('Ukrainian')), 494 504 ('zh-cn', _('Simplified Chinese')), 505 ('zh-tw', _('Traditional Chinese')), 495 506 ) 496 507 django/branches/multiple-db-support/docs/templates.txt
r3502 r3648 142 142 </div> 143 143 </body> 144 </html> 144 145 145 146 This template, which we'll call ``base.html``, defines a simple HTML skeleton … … 197 198 </div> 198 199 </body> 200 </html> 199 201 200 202 Note that since the child template didn't define the ``sidebar`` block, the … … 364 366 Signal that this template extends a parent template. 365 367 366 This tag can be used in two ways: 368 This tag can be used in two ways: 367 369 368 370 * ``{% extends "base.html" %}`` (with quotes) uses the literal value … … 962 964 ~~~~~~~~~ 963 965 964 Returns a plural suffix if the value is not 1. By default, this suffix is ``'s'``. 966 Returns a plural suffix if the value is not 1. By default, this suffix is ``'s'``. 965 967 966 968 Example:: … … 968 970 You have {{ num_messages }} message{{ num_messages|pluralize }}. 969 971 970 For words that require a suffix other than ``'s'``, you can provide an alternate 972 For words that require a suffix other than ``'s'``, you can provide an alternate 971 973 suffix as a parameter to the filter. 972 974
