898 messages

com.googlegroups.django-updates [All Lists]

2008 March [All Months]

Page 35 (Messages 851 to 875): 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

[Django Code] #6692: Saving NUL character truncates string using SQLite - Django Code
[Django Code] #6693: Inconsistency in localized datetime formats between filters and utility functions I tried to understand handling of localized datetime formats in django. It seems filters (django.template.defaultfilters.date and django.template.defaultfilters.time) use settings - without any localization. And utility functions (django.utils.translation.trans_real.get_date_formats and django.utils.translation.trans_real.get_partial_date_formats) use localized values of strings "DATE_FORMAT", "DATETIME_FORMAT", "TIME_FORMAT", "YEAR_MONTH_FORMAT" and "MONTH_DAY_FORMAT" - settings is ignored (if these strings are untranslated of if trans_null is used, utility functions behave as filters). I don't think it is right. I would like to describe main use cases (with my opinions on them) and propose an solution. =USE_I18N is False= How it should be: Values from (global or local) settings should be used everywhere. How it is: Without any problems. =USE_I18N is True, only one language is used= How it should be: As in the previous use case. And if the language is different from English, localized values should be used be default. How it is: There are some problems - in templates (through filters) values are not localized be default; in admin (through utility functions) local settings is ignored. Documentation says: "DATE_FORMAT - The default formatting to use for date fields on Django admin change-list pages." It is not true in this situation. =USE_I18N is True, more languages are used= Inconsistency in localized datetime formats between filters and utility functions How it is: There are some problems - both from the previous use case; translation of datetime formats from local settings is not simple. =Possible solution= 1. Mark DATE_FORMAT, DATETIME_FORMAT, TIME_FORMAT, YEAR_MONTH_FORMAT and MONTH_DAY_FORMAT for translation in django.conf.global_settings.py. 2. Translate these string to all languages. 3. Use translated version of formats from settings in filters. 4. Deprecate get_date_formats and trans_real.get_partial_date_formats and use ugettext/ugettext_lazy with argument DATE_FORMAT (and friends) instead. - Django Code
Re: [Django Code] #2705: [patch] Add optional FOR UPDATE clause to QuerySets - Django Code
Re: [Django Code] #2443: Add IntervalField to database models - Django Code
Re: [Django Code] #6083: contrib.auth still uses oldforms - Django Code
Re: [Django Code] #5589: Memcache backend should allow retrieval of stored binary objects - Django Code
Re: [Django Code] #4620: Custom labels for choices in ModelChoiceField - Django Code
Re: [Django Code] #5836: Test client does not clear exception info after re-raising an exception that was raised by a view - Django Code
Re: [Django Code] #6704: .exclude(foreignkey_field__isnull=True) doesn't quite work on qs-rf - Django Code
Re: [Django Code] #6720: Update to Bulgarian translation - Django Code
Re: [Django Code] #6735: Class-based generic create/update/delete views - Django Code
Re: [Django Code] #6010: Extra context for newforms admin views - Django Code
[Changeset] r7213 - in django/branches/gis/django/contrib/gis: . db db/backend db/backend/mysql db/backend/oracle db/backend/postgis db/models db/models/fields gdal gdal/prototypes geos geos/prototypes management management/commands maps maps/google maps/openlayers oldforms templates templates/gis templates/gis/google templates/gis/google/js templates/gis/kml tests tests/distapp tests/geoapp tests/geoapp/sql tests/layermap tests/layermap/cities tests/layermap/counties tests/layermap/interstates tests/test_point tests/test_poly utils - nore...@djangoproject.com
Re: [Django Code] #5879: Session riding vulnerability in the admin app - Django Code
Re: [Django Code] #6503: Protect reporter email addresses from spambots (upgrade trac?) - Django Code
[Django Code] #6765: Docs for 'Providing initial SQL data' misleading - Django Code
[Django Code] #6767: Oracle backend treats DecimalFields as floats somewhere, losing precision - Django Code
Re: [Django Code] #5920: Error AttributeError: 'function' object has no attribute 'status_code' in 6668 version - Django Code
[Changeset] r7248 - django/branches/queryset-refactor/django/db/models - nore...@djangoproject.com
[Django Code] #6784: "is_public yes" doesn't work in template tag "comment_form" - Django Code
Re: [Django Code] #6128: Unable to register commands from apps inside the project - Django Code
Re: [Django Code] #6138: newforms: when accessing directly form.errors, error_class is not used - Django Code
[Changeset] r7253 - in django/branches/queryset-refactor: django/db/models django/db/models/fields django/db/models/sql tests/modeltests/model_inheritance - nore...@djangoproject.com
[Changeset] r7277 - django/trunk/django/contrib/formtools - nore...@djangoproject.com
Re: [Django Code] #5079: DecimalFields converted to float before being stored - Django Code

Page 35 (Messages 851 to 875): 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36