#12264: calendar.js depends on jsi18n but date widgets using it do not specify as
required media
------------------------------+------------------------------------
Reporter: tblanchard@… | Owner: nobody
Type: New feature | Status: new
Component: Forms | Version: 1.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by Adam Zapletal):
* cc: Adam Zapletal (added)
Comment:
It looks like this is still valid. Supporting this idea doesn't seem very
straightforward given the dynamic nature of
`django/views/templates/i18n_catalog.js`. I agree with the comment above
that it's ok if a user wanting to use admin-specific widgets that aren't
designed to be used outside of the admin may have to do a bit of extra
integration work.
If a user wants to use the widgets without internationalization, they
should be able to define simple JavaScript stubs for `gettext`,
`pgettext`, and `get_format` to get things working. If they want to use
internationalization, I feel like having to do the same kind of
integration that the admin does is acceptable.
Considering the above, does this bit of the docs on form media seem
misleading?
https://github.com/django/django/blob/73df8b54a2fab53bec4c7573cda5ad8c869c2fd8/docs/topics/forms/media.txt#L21-L32
--
Ticket URL: <
https://code.djangoproject.com/ticket/12264#comment:5>