Re: Provide 'V' as alias for 'Value'?

2017-04-05 Thread Marc Tamlyn
Given that you can always do import Value as V, I'm not sure providing an alias is necessary. On 3 April 2017 at 12:15, Josh Smeaton wrote: > I think I proposed V as an alias back when I was writing the patch, but > the rough consensus at the time was that one letter

Re: Provide 'V' as alias for 'Value'?

2017-04-03 Thread Josh Smeaton
I think I proposed V as an alias back when I was writing the patch, but the rough consensus at the time was that one letter class names are a bit of an anti pattern (Q, F) that we shouldn't persist with. Aliasing V in the examples was my way of sneaking the idea through for those who chose to

Provide 'V' as alias for 'Value'?

2017-04-03 Thread Adam Johnson
When writing filter expressions using database functions, one is often forced to use django.db.models.Value to wrap raw values to avoid them being interpreted as column references. Value is fairly cumbersome to write when it can appear several times in a complex queryset definition, so it's common