#37155: Allow templatetag `querystring` to start from an empty state
-------------------------------------+-------------------------------------
     Reporter:  Sjoerd Job Postmus   |                    Owner:  (none)
         Type:  New feature          |                   Status:  closed
    Component:  Template system      |                  Version:  6.0
     Severity:  Normal               |               Resolution:
                                     |  needsnewfeatureprocess
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

 * resolution:   => needsnewfeatureprocess
 * status:  new => closed

Comment:

 Thanks for the report and the detailed write-up. The use case is
 understandable, but this is a new feature rather than a bug, and the bar
 for extending built-in template tags is high, especially when the same
 result is achievable at the project level with very little code. A custom
 template tag wrapping `querystring` without the `request.GET` default is
 trivial to write using `simple_tag`:

 {{{#!python
 from django.template.defaulttags import querystring

 @register.simple_tag(takes_context=True)
 def clean_querystring(context, **kwargs):
     return querystring(context, {}, **kwargs)
 }}}

 This reuses `querystring` entirely and can be tailored to each project's
 naming and behavior preferences. Marking as `needsnewfeatureprocess`, if
 there is broader community interest, please shepherd this through the new
 feature ideas GitHub project per the contributing guidelines
 (https://docs.djangoproject.com/en/dev/internals/contributing/bugs-and-
 features/).
-- 
Ticket URL: <https://code.djangoproject.com/ticket/37155#comment:1>
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 view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019eb3a13e8f-dfbf1bbf-f230-45ea-a021-57d5b2a4d89a-000000%40eu-central-1.amazonses.com.

Reply via email to