#26545: Improve documentation of dictsort template filter arguments
--------------------------------------+--------------------
     Reporter:  filias                |      Owner:  nobody
         Type:  Cleanup/optimization  |     Status:  new
    Component:  Documentation         |    Version:  1.9
     Severity:  Normal                |   Keywords:
 Triage Stage:  Unreviewed            |  Has patch:  0
Easy pickings:  1                     |      UI/UX:  0
--------------------------------------+--------------------
 The dictsort template filter is commonly used in Django with the following
 syntax (from django.views.debug):

 {{{
 {% for k, v in settings.items|dictsort:0 %}
   {{ k }} = {{ v|stringformat:"r" }}
 {% endfor %}
 }}}

 In the documentation it is not clear what the 0 argument means.

 Would be great to add that explanation: when using an integer value as an
 argument the dictionary will be sorted according to the character in the
 position given by the argument. Basically that 0 means that it will be
 sorted alphabetically as 0 is the first character of the keys string.

--
Ticket URL: <https://code.djangoproject.com/ticket/26545>
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/049.353d35a0a84a58e6be197df69f4e7b7a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to