Clarification

32 views
Skip to first unread message

Pibi PostItBuyIt

unread,
Sep 29, 2015, 2:26:53 PM9/29/15
to django-watson discussion group
So this is definitely a newbie question, but I am going through the 'Getting Started Guide' and just need a bit of a clarification on the Searching for Models section. After I registered my models it says searching is as easy as  search_results = watson.search("Your search terms")  what exactly does that mean, do I place that code somewhere in a view or template?

Speaking of templates, when I try to modify the Search_Results template in the Watson folders, changes do not seem to take effect even after saving and rebuilding, the search_results page looks the same as it did before any of my changes? 


Dave Hall

unread,
Sep 30, 2015, 4:25:51 AM9/30/15
to django-watson discussion group
You would call watson.search() in a view, and pass the results to a template to for rendering. Views are for assembling the data, templates are for displaying it. Simples!

You shouldn't modify the watson templates directly. You should create copies of the template files in your project's own template directory, and modify those.

On Tue, 29 Sep 2015 at 19:26 Pibi PostItBuyIt <posti...@gmail.com> wrote:
So this is definitely a newbie question, but I am going through the 'Getting Started Guide' and just need a bit of a clarification on the Searching for Models section. After I registered my models it says searching is as easy as  search_results = watson.search("Your search terms")  what exactly does that mean, do I place that code somewhere in a view or template?

Speaking of templates, when I try to modify the Search_Results template in the Watson folders, changes do not seem to take effect even after saving and rebuilding, the search_results page looks the same as it did before any of my changes? 


--
You received this message because you are subscribed to the Google Groups "django-watson discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-watso...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-watson.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages