#18394: Better docs, and possibly better handling, for 'packages' argument to
javascript_catalog
--------------------------------------+------------------------------------
     Reporter:  ubernostrum           |                    Owner:  nobody
         Type:  Bug                   |                   Status:  new
    Component:  Internationalization  |                  Version:  1.4
     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 timgraham):

 * cc: claudep (added)


Old description:

> The ``javascript_catalog`` i18n view's ``packages`` argument only accepts
> modules which are either ``django.conf`` or which are also in
> ``INSTALLED_APPS``. But there are two issues with this:
>
> 1. The documentation for the view hides this a bit, and can create the
> impression that the restriction only applies to a ``packages`` argument
> passed through the URL.
>
> 2. The view itself does not give you any warning if you're violating this
> restriction; it just silently discards anything in ``packages`` that
> doesn't meet the requirements.
>
> At the very least, the documentation should be more up-front that this
> requirement always applies no matter how you're passing ``packages`` to
> the view. Possibly as a bonus, the view should warn that it's discarding
> any packages that don't conform to the requirements, to aid in debugging.

New description:

 The `javascript_catalog` i18n view's `packages` argument only accepts
 modules which are either `django.conf` or which are also in
 `INSTALLED_APPS`. But there are two issues with this:

 1. The documentation for the view hides this a bit, and can create the
 impression that the restriction only applies to a `packages` argument
 passed through the URL.

 2. The view itself does not give you any warning if you're violating this
 restriction; it just silently discards anything in `packages` that doesn't
 meet the requirements.

 At the very least, the documentation should be more up-front that this
 requirement always applies no matter how you're passing `packages` to the
 view. Possibly as a bonus, the view should warn that it's discarding any
 packages that don't conform to the requirements, to aid in debugging.

--

Comment:

 Claude, I know made some improvements when you created the new
 `JavaScriptCatalog` class-based view in 1.10. Is this ticket still
 relevant for that view?

--
Ticket URL: <https://code.djangoproject.com/ticket/18394#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.1433a7bf0d8ff10905618edc3ba7e16d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to