Eric Abrahamsen
unread,Jan 26, 2015, 10:26:52 PM1/26/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
As far as I can tell (testing with the Conkeror web browser), it's
possible to read both GET and POST at once: if a user POSTs to a URL
containing GET parameters, you can get them both in the view.
Is this reliable behavior across browsers? Is it a dumb idea for reasons
I haven't thought of?
A bit of background, in case there's simply a better approach to this:
I'm using GET parameters to create custom model formsets: depending on
those parameters, I construct different initial data, and set some of the
form fields to use hidden input -- this makes it much easier for users
to input bulk model instances without having to mess with endless
drop-down menus.
But I need the same initial data when handling the POST request, which
means I either need to re-read the GET parameters in the POST method
(I'm not sure that's reliable), or I need to otherwise store the values
of those parameters (ie in the session), and read them again from there
during POST.
URL arguments would be stable, but there are many different possible
parameters, half of which won't even be present for any given formset,
and I don't know how to handle that using URL segments.
I'd be interested in hearing any thoughts on this!
Thanks,
Eric