You have to pass form instance to all pages context where it is used. You
can do it explicitly or write custom context processor or (the better
solution) write custom inclusion tag.

On Tue, Nov 25, 2008 at 20:13, Alfonso <[EMAIL PROTECTED]> wrote:

>
> Hey,
>
> I've put together a simple search form that works perfectly when
> navigating to the corresponding url - '/search.html'.  However I want
> to reuse that form on multiple pages so where relevant I use {%
> include 'search.html' %} to inject the form where I need it.
>
> Problem is this form is devoid of any fields when I do that??
>
> The search.html form:
> <div id="col1">
> <form action="."method="POST">
> {{ form.as_p }}
>        <p><input type="submit" value="Search"></p>
> </form>
> </div>
>
> Thanks
>
> Alfonso
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to