New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Order of filter arguments 'attribute' and 'case_sensitive' #736
Comments
Not for sorting for sure. In templates you almost never want a case-sensitive sort, it's not very human-friendly and that's what sorting in templates is usually used for. |
|
While I think people should be using a kwarg for |
Not going to change |
I'd rather keep the same order in the new filters to avoid this kind of confusion. I think using kwargs for any of these arguments is clearer anyway |
Yeah, being consistent is probably a better idea here. I'll change the examples to use kwargs consistently too. |
sort
initially didn't take anattribute
argument, so when it was added,case_sensitive
came first. Therefore, you have to dosort(attribute='name')
to specify the attribute only. Now we've addedunique
,min
, andmax
, all of which take both arguments. I think it makes more sense forattribute
to come first, but for consistency should we keep it second even for new filters?Aside: I also thinkcase_sensitive
should default to true, not false, especially sincestr.lower
is not very robust for Unicode.The text was updated successfully, but these errors were encountered: