On Feb 23, 10:00 pm, djandrow <andrewkenyon...@gmail.com> wrote:
> Hello,
>
> Each of the html pages on my site extends base.html but i'm trying to
> get a search box going which will appear on each page. So this will go
> on the base.html template. Since base.html is never called except
> through other templates. In what view should the code for this go in,
> i can't imangine it would have to go in every view would it?
>
> Thanks
>
> Andrew

By 'code' I presume you mean the code that processes the search
queries and returns results?  It can go wherever you like, and the
search box just posts to the view that the search code is in.
Preferably, use the {% url %} tag in the action attribute of the form
to lookup the URL of the view via the urlconf.
--
DR.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to