#30310: New HTTPRequest.headers not usable in templates because of hyphens
-------------------------------------+-------------------------------------
Reporter: Mark Tranchant | Owner: nobody
Type: New feature | Status: new
Component: HTTP handling | Version: 2.2
Severity: Normal | Resolution:
Keywords: request headers | Triage Stage: Accepted
hyphen template |
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mark Tranchant):
Pull request now includes refactoring with Carlton's simplification
(thanks!), a simple test, and some documentation.
Whilst I understand the "use a filter instead" argument, and agree with
that where the **user** chooses to supply hyphenated variable names in the
context, I believe that as this is a new problem caused by Django itself,
it should include a solution that is as neat as other variable lookups. In
my case, I tried to use the seemingly-neater replacement for the clunky
`request.META` but ran into this problem.
--
Ticket URL: <https://code.djangoproject.com/ticket/30310#comment:7>
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/071.e008f023d406ddd34bbd557459ba0dff%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.