Simon Willison wrote:
>
>
> On 21 Nov 2005, at 01:05, Robert Wittams wrote:
>
>> Also, do we just pick a bunch of things this works for, or is it
>> extensible?
>
>
> Definitely extensible. Ideally developers will add new filters to fit
> any type that their application deals with that isn't already covered.
> As such, my initial proposed syntax (methods on the GET object) would
> have to change.
>
Maybe
from django.core import input
a = request.GET.get('a', 0).as(input.int)
a_list = request.GET.get_list('a', 0).as(input.int)
And in
a = request.GET.get('a', 0)
or
a = request.GET['a']
'a' would act like a string with the evil stripped out(lazily) if used
for anything other than calling the method 'as' , ?
the result of get_list would act like a list of evil-stripped strings.