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

Ability to search by entity type #25

Open
philgooch opened this issue May 1, 2013 · 1 comment
Open

Ability to search by entity type #25

philgooch opened this issue May 1, 2013 · 1 comment

Comments

@philgooch
Copy link

A really useful enhancement would be to be able to search by entity type, e.g. have a combo box below the search field to allow one or more of the defined entity types to be selected, in order to limit the search to just these types.

@ajenhl
Copy link
Owner

ajenhl commented May 28, 2013

This should be easy enough to implement:

  • Add an entity type field to forms/display.py EntitySearchForm.
  • Modify views/display.py search and search_eatsml to get the entity type from the form and pass it through to lookup_entities.
  • Modified the line sets.append(set(Entity.objects.filter(query))) in models/eats_topic_map.py lookup_entities to sets.append(set(Entity.objects.filter(query).filter_by_entity_type(entity_type).
  • Add in logic to not include that filter_by_entity_type if no entity_type is supplied.

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