On 8/8/2010 5:41 AM, wchildsuk wrote: > Hi, > > I want a search field on all my pages and was wondering the best way > to do this. I could create a function and import it to every view but > this doesn't seem to follow the django DRY principles. > > I was wondering if anyone had any advice on how to best do this with > django? > > Thank in advance > The usual way would be to use template inheritance. Put the search form in your base template and have your remaining templates extend that base template.
http://docs.djangoproject.com/en/dev/topics/templates/#template-inheritance regards Steve -- I'm no expert. "ex" == "has-been"; "spurt" == "drip under pressure" "expert" == "has-been drip under pressure". -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.