Re: Removal of USE_L10N setting

2022-09-05 Thread Michael
`USE_L10N = True` breaks all my forms that have Datetime fields. The 
`value` attribute of the date inputs no longer are in the right format, and 
the POSTing the data fails. Might be worth alerting other as part of the 
release.

On Thursday, 11 August 2022 at 18:30:36 UTC+2 Michael wrote:

> Starting with version Django 5.0, with USE_L10N setting being removed, 
> will there be any way to control how date times look in the Admin site? 
> Removing this setting makes scientific/engineering applications lose a lot 
> of control in the admin interface. Say I have a field created_utc and it 
> needs to be shown in ISO format in the admin interface, how would one do 
> that with this change?
>
> On Friday, 13 August 2021 at 15:55:29 UTC+2 Uri wrote:
>
>> In my project USE_L10N = True and USE_I18N = True since the 
>> beginning (2016).
>> אורי
>> u...@speedy.net
>>
>>
>> On Fri, Aug 13, 2021 at 4:47 PM Claude Paroz  wrote:
>>
>>> I don't think I've ever set USE_L10N to True, and I've been using 
 Django in production since 0.96. 

>>>
>>> What would be most interesting to know is whether setting USE_L10N to 
>>> True would cause issues in your projects.
>>>
>>> Claude
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django developers (Contributions to Django itself)" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to django-develop...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-developers/7da3ed2b-8d31-4c9e-9423-c8eac33f93cfn%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/55ae6713-d3f7-4eed-b787-16c370c2469en%40googlegroups.com.


ModelForm fields localization

2022-09-05 Thread Christian González

Hi devs,

just stumbled upon a small (docs?) issue: at 
https://docs.djangoproject.com/en/4.1/topics/forms/modelforms/#enabling-localization-of-fields 
, there is an example of how to use that feature. but copy'n'pasting 
that, it won't work, as "fields" is stilla required attribute in the 
Meta class.


For someone not knowing that before this is a bit cumbersome - even me 
as someone who deals quite a long time with Django, I was wondering why


1. ModelForms do not translate their fields
2. the docs don't make clear that localized_fields does not *replace* 
the fields attr.


So I suggest to add a line to the documentation:
fields = ("birth_date",)
This fixes 2)

I, for myself, would even go further and deprecate localized_fields - as 
this should be the normal behaviour. ModelForm SHOULD translate model 
labels as default, and a not_localized_fields = [...] (better name?) 
could satisfy the use cases where fields should NOT be localized - which 
are IMHO the minor part.
This would certainly break things, and I know (and appreciate) your 
conservative approach in Django development.


I found an old ticket: https://code.djangoproject.com/ticket/13546 Where 
this was discussed. But there the "localized_excluded" option was 
suggested additionally to "localized_fields", which overcomplicates 
things and dowsn't make sense. But reversing the logic completely would 
make more sense IMHO.


But maybe I just didn't understand why ModelForm does NOT localize 
fields in the first place per default. You may have a good reason for that.


Christian

--
Dr. Christian González
https://nerdocs.at

--
You received this message because you are subscribed to the Google Groups "Django 
developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/dd89fee6-0b5a-0a24-5b0e-35e5e7526a20%40nerdocs.at.


Re: Fellow Reports - August 2022

2022-09-05 Thread Mariusz Felisiak
Week ending September 2, 2022 

*Triaged: *
   https://code.djangoproject.com/ticket/33960 - migrate command crashes on 
SQLite < 3.20. (accepted) 
   https://code.djangoproject.com/ticket/33958 - Missing imports in 
"Expressions can reference transforms" section. (accepted) 
   https://code.djangoproject.com/ticket/33959 - Missing import in 
"Expressions can reference transforms" section (duplicate) 
   https://code.djangoproject.com/ticket/33961 - Update admin's jQuery to 
3.6.X. (created) 
   https://code.djangoproject.com/ticket/33962 - I want use Django without 
admin,auth,sessions,contenttypes or any other prebuild apps (invalid) 
   https://code.djangoproject.com/ticket/33963 - Combining Q objects with 
empty querysets crashes. (invalid) 
   https://code.djangoproject.com/ticket/33966 - Add support for using 
KeyTextTransform from lookup (accepted) 
   https://code.djangoproject.com/ticket/33967 - Make EmailValidator accept 
internationalized local part (duplicate) 
   https://code.djangoproject.com/ticket/33968 - Make EmailValidator and 
URLValidator IDNA 2008 compliant (wontfix) 
   https://code.djangoproject.com/ticket/33970 - select_for_update code 
snippet example selects for update outside of it's transaction (invalid) 
   https://code.djangoproject.com/ticket/33965 - Improve docs for PIL 
validation of ImageField (accepted)
   https://code.djangoproject.com/ticket/33969 - Improve 
django.core.mail.messages EAI processing (needsinfo) 
   https://code.djangoproject.com/ticket/33971 - admindocs breaks the admin 
if it appears before the admin in INSTALLED_APPS (accepted) 
   https://code.djangoproject.com/ticket/33973 - Performance regression 
when moving from 3.1 to 3.2 (needsinfo) 
   https://code.djangoproject.com/ticket/33974 - Serializer incorrectly 
serializes Integer ArrayField as string (wontfix) 
   https://code.djangoproject.com/ticket/33975 - __in doesn't clear 
selected fields on the RHS when QuerySet.alias() is used after annotate(). 
(accepted) 
   https://code.djangoproject.com/ticket/33976 - HTTP_HOST does not allow 
an ipv6 not enclosed in [] (invalid) 
   https://code.djangoproject.com/ticket/33977 - Grouping action in the 
ModelAdmin (duplicate) 

*Reviewed/committed: *
   https://github.com/django/django/pull/15979 - Improved example of index 
on SearchVector in full text search docs. 
   https://github.com/django/django/pull/16005 - Fixed #33958 -- Added 
imports to examples in "Expressions can reference transforms" section. 
   https://github.com/django/django/pull/15985 - Fixed #21204 -- Tracked 
field deferrals by field instead of models. 
   https://github.com/django/django/pull/16003 - Refs #30947 -- Changed 
tuples to lists where appropriate. 
   https://github.com/django/django/pull/15958 - Added Central Kurdish 
(Sorani) language. 
   https://github.com/django/django/pull/15977 - Corrected the direction of 
arrows in admin selector boxes for RTL languages. 
   https://github.com/django/django/pull/16018 - Fixed #33965 -- Improved 
file-like object example of ImageField in docs.
   https://github.com/django/django/pull/16023 - Refs #29799 -- Added more 
tests for registering lookups. 
   https://github.com/django/django/pull/16021 - Fixed 
ReadOnlyPasswordHashWidget's template for RTL languages. 
   https://github.com/django/django/pull/15787 - Fixed #29799 -- Allowed 
registering lookups per field instances. 

*Authored: *
   https://github.com/django/django/pull/16006 - Refs #28333 -- Fixed 
NonQueryWindowTests.test_invalid_filter() on databases that don't support 
window expressions. 
   https://github.com/django/django/pull/16007 - Fixed #33960 -- Fixed 
migrations crash on SQLite < 3.20. 
   https://github.com/django/django/pull/16008 - Refs #33953 -- Fixed 
test_rename_model_with_db_table_rename_m2m() crash on SQLite < 3.26. 
   https://github.com/django/django/pull/16014 - Refs #26780 -- Made 
prefetch_related() don't use window expressions for sliced queries if not 
supported. 
   https://github.com/django/django/pull/16020 - Reverted "Fixed #30711 -- 
Doc'd django.contrib.postgres.fields.hstore.KeyTransform()."
   https://github.com/django/django/pull/16022 - Bumped versions in 
pre-commit and npm configurations. 
   https://github.com/django/django/pull/16024 - Fixed #33955, Fixed #33971 
-- Reverted "Fixed #32565 -- Moved internal URLResolver view-strings 
mapping to admindocs." 
   https://github.com/django/django/pull/16026 - Corrected heading level of 
"Registering and fetching lookups" section in docs.

Best,
Mariusz

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/7f4b9d32-6402-4f76-b444-ac5562b2e137n%40googlegroups.com.