Your Ad Here

Wednesday, January 18, 2012

Case insensitive query dictionaries

I have a standard that requires that HTTP parameter names be case-insensitive, and while I thought for awhile I could ignore that requirement, I've found that clients use all kinds of case structures on their parameters, so I need case insensitivity.  

Is there a standard way to ignore the case of parameters in a request.GET / request.POST / request.REQUEST dictionary?  I haven't found one.  If not, would the "best" (most Django-esque) implementation of this be in middleware, or to construct a "wrapper" that digs all the parameters out of the class and returns a case normalized version?

-- Jeff

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 comments:

Post a Comment