Changes between Initial Version and Version 1 of Ticket #36145, comment 3
- Timestamp:
- Feb 6, 2025, 2:34:59 PM (6 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #36145, comment 3
initial v1 7 7 }}} 8 8 9 I found the test code for the 'FIRST_DAY_OF_WEEK' attribute in tests>i18n>tests.pyline 697.9 I found the test code for the {{{FIRST_DAY_OF_WEEK}}} attribute in {{{tests>i18n>tests.py}}} line 697. 10 10 It says that locale's formats take precedence over the default settings. 11 When I checked with several locale's formats files, I found that some of them have the 'FIRST_DAY_OF_WEEK'attribute while others don't have it.12 Since the locale's formats take precedence, you can't change the 'FIRST_DAY_OF_WEEK'attribute if the locale's file has it.13 If it doesn't have the attribute , such as LANGUAGE_CODE = 'ko,'you can simply change it in the settings.py.11 When I checked with several locale's formats files, I found that some of them have the {{{FIRST_DAY_OF_WEEK}}} attribute while others don't have it. 12 Since the locale's formats take precedence, you can't change the {{{FIRST_DAY_OF_WEEK}}} attribute if the locale's file has it. 13 If it doesn't have the attribute such as {{{LANGUAGE_CODE='ko'}}}, you can simply change it in the settings.py. 14 14 15 15 Now I have found a bug. On the documentation, it says the following. … … 17 17 A number representing the first day of the week. This is especially useful when displaying a calendar. This value is only used when not using format internationalization, or when a format cannot be found for the current locale. 18 18 19 When I used USE_I18N=False, I couldn't use the FIRST_DAY_OF_WEEKas I wanted.20 I think this is because 'USE_L10N' was removed from v5.0 but is still used in the 'get_format' function in django>utils>formats.pyrather than use_i18n.19 When I used {{{USE_I18N=False}}}, I couldn't use the {{{FIRST_DAY_OF_WEEK}}} as I wanted. 20 I think this is because {{{USE_L10N}}} was removed from v5.0 but is still used in the 'get_format' function in {{{django>utils>formats.py}}} rather than use_i18n. 21 21 I will keep working on this issue to remove the use_l10n part from the get_format and follow the current documentation.