Skip to content
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

Use of verbose_name for filters #14

Closed
gthieleb opened this issue Jun 9, 2017 · 2 comments
Closed

Use of verbose_name for filters #14

gthieleb opened this issue Jun 9, 2017 · 2 comments

Comments

@gthieleb
Copy link

gthieleb commented Jun 9, 2017

Is it possible to use verbose_name of a model attribute instead of the attribute itself?

E.g.

 'Title ~ "war" and Author.Last-Name = "Tolstoy"'
@stebunovd
Copy link
Member

It's not possible in the current version, and actually, I don't see an easy way how it could be implemented on parser level. The biggest problem is that verbose names are not guaranteed to be unique. Another problem is that verbose names can contain literally any characters, so some kind of characters escaping would be necessary, and it could be challenging to implement it in a clear and user-friendly way.

However I guess we might consider adding verbose names into completion widget, probably it could make it easier for users to understand what do those attribute names mean.

@gthieleb
Copy link
Author

gthieleb commented Jun 9, 2017

Thanks for your quick response. Perhaps the user only needs to have the possible attributes displayed. I will look at the approach with the widget code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants