--
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/22755ead-1fe0-460a-9581-41c920f4e424%40googlegroups.com.
I don't understand how this is related to Custom Format Files.
--
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/364d0c49-2c1b-44ea-819c-6aedc5a6b0bc%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CABD5YeEDUjpzxgEwUh%3D%2BFsKjvD8Wx6s1S%2B-HY2nfmFo_WUv2KA%40mail.gmail.com.
from django.conf import settings as django_settingsfrom django.utils import formatsdef patch():formats.FORMAT_SETTINGS = formats.FORMAT_SETTINGS.union(django_settings.FORMAT_SETTINGS)
{% if can_view_profile and user.date_of_birth %}
{% if can_view_dob_day_month or can_view_dob_year %}
<tr>
<th nowrap="nowrap">{% if can_view_dob_day_month %}{% trans 'Birth Date' %}{% elif can_view_dob_year %}{% trans 'Birth Year' %}{% endif %}</th>
<td>
{% if can_view_dob_day_month and can_view_dob_year %}
{{ user.date_of_birth|date:"DATE_FORMAT" }}
{% elif can_view_dob_day_month %}
{{ user.date_of_birth|date:"MONTH_DAY_FORMAT" }}
{% elif can_view_dob_year %}
{{ user.date_of_birth|date:"YEAR_FORMAT" }}
{% endif %}
</td>
</tr>
{% endif %}
{% endif %}
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAJwKpyQV9x%2Ba9tbYx%3DKQrxCyuH7RD06-bmn03tUhEu_Pu5atVw%40mail.gmail.com.
I want to use YEAR_FORMAT in the template the same why I'm using DATE_FORMAT and MONTH_DAY_FORMAT:
And to be able to customize YEAR_FORMAT for specific locales if it needs to be customized. But not to define it if it's equal to the default value which I defined
Does Custom Format Files do it?
I'm going to try to implement the patch on Speedy Net right now without having to update 14 files. There is a suggestion on Stack Overflow.