On Tue, May 19, 2009 at 10:38 PM, Andrew Ingram <[email protected]> wrote: > > This is the only real way to do this with Django, though I do wish > there was a core Django way to validate GET params, ie which ones are > allowed and what format they should be.
You mean, something like the Forms framework? :-) Ordinarily, the Forms framework is used to handle inputs submitted using HTML <input> elements via a HTTP POST, but the Forms framework will work just as well with request.GET. Your Form definition can declare the get arguments that will be accepted, perform validation on them if required, specify default values, specify required arguments, and cross validate between optional arguments (i.e., if you specify x, you must specify y, but you can't specify z as well). The fact that you will never use the rendering portion of the Form doesn't matter at all - you just use the validation part that you require. Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

