Re: Introspection of querysets

2018-11-02 Thread Tim Graham
Could you explain the use case for the code that needs to handle the different types of iterators? On Friday, November 2, 2018 at 11:18:34 AM UTC-4, Dan Davis wrote: > > I'm wondering two things: > >- Is there any non-internals way to know what sort of iterable a >queryset is set to

Introspection of querysets

2018-11-02 Thread Dan Davis
I'm wondering two things: - Is there any non-internals way to know what sort of iterable a queryset is set to do? Should there be? Background - users should not write code to look at isinstance(queryset._iterable_class, FubarIterator) because that is a private interface (and it

Re: Make input field remove newlines from value

2018-11-02 Thread Carlton Gibson
Hi Jakub. Definitely stripping input isn't something I'd want to add: what if I want to accept input with trailing whitespace? Rather, the approach is to transform the incoming data in your form or serialiser at the clean or validation step. See: *