etianen / django-watson

Full-text multi-table search application for Django. Easy to install and use, with good performance.
BSD 3-Clause "New" or "Revised" License
1.2k stars 130 forks source link

extra_context: How to use it? #203

Closed ZaibiMughal closed 7 years ago

ZaibiMughal commented 7 years ago

Can i have a moment please. Actually what i am thinking is that i want to display a drop down list of values from my model. Right now it's not showing anything from my model, By reading your docs i think extra_context could help me out. If yes then please let me know the syntax to use it. Thanks

etianen commented 7 years ago

I don't think yo need extra_context.

In your template code, do something like this:

{{search_result.obj.whatever_field_you_want}}

As in, you can access the original django model from {{search_result.obj}}.