Bad idea? A subjectivity at best to be honest. But yes, I was thinking I
could pull it from the querystring but also would rather not reparse
something already done, let alone in a framework I and many jumped on
because it's DRY ;-)
The problem I'm solving is not a mission critical thing by any measure,
only a nicety for completeness. Sometimes (often) the order of events
makes a difference (code being a classic and ubiquitous example ;-) and
that applies to commands, and to requests (which are in the family of
commands). But I can resolve it also by:
a) forcing a consistency on the incoming parameters (rejecting daft
things with an error)
b) forcing a priority on the parameters I receive through GET (i.e.
having a defined result no matter how daft the parameters are) , or
c) passing a single parameter that is an ordered string with another
delimeter (not &), thus passing an order in.
Arguably a) is ideal, which leads to you "bad idea" observation but
there are loads of options really, it just surprised me in a sense that
an ordered string comes in and some of that information is discarded and
not made easily available is all.
Regards,
Bernd.
Melvyn Sopacua wrote:
On Thursday 08 June 2017 17:11:36 Bernd Wechner wrote:
> Am curious if there's an easy way to walk through request.GET in the
> order they appeared on the URL? It strikes me the dictionary has lost
> this ordering information, and I wonder if it's available anywhere or
> how one might extend Django to supply an OrderedDict when requested?
Bad idea. What are you trying to solve that requires an ordering in
parameters?
If you're deadset on it, you can always grab the original query string
(request.META.query_string) and split it's components yourself.
--
Melvyn Sopacua
--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to django-users+unsubscr...@googlegroups.com
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com
<mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/4059283.0tOvQjxIds%40devstation
<https://groups.google.com/d/msgid/django-users/4059283.0tOvQjxIds%40devstation?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/0e772ee4-ecdb-e4ab-2360-f42590fcc160%40gmail.com.
For more options, visit https://groups.google.com/d/optout.