Re: An idea for Q filter objects

2016-03-28 Thread Stephen J. Butler
Why not do this in the database? Create a view with an extra column that is called "field_dttxt" that is to_char(field, 'Mon DD, '). Then add this as a field to Django and let it use the normal Q lookups. On Mon, Mar 28, 2016 at 5:13 PM, Michael E wrote: > I don't know if this is possible, b

Re: An idea for Q filter objects

2016-03-28 Thread Tim Graham
I think the issue would be fixed by tackling the ticket, "Get rid of field.get_db_prep_lookup()" [0]. If I understand correctly, the exception is coming from DateField.get_db_prep_value() which is trying to do the conversion to a datetime. [0] https://code.djangoproject.com/ticket/22936 On Mon

An idea for Q filter objects

2016-03-28 Thread Michael E
I don't know if this is possible, but I think it would highly useful if it were. Basically, I want to filter a DateField as though it were a string (see the StackOverflow post to understand why) I

Add HTML5 required attribute on form widgets

2016-03-28 Thread Jon Dufresne
Hi, I'm working on ticket #22383 to add the HTML5 required attribute to form widgets. The hope is this will add an additional level of validation at the client side. The feedback provided to the user is much faster than a server round trip. This is something I've done manually in my own projects