Thanks for the quick reply! I realize that this is an option but it seems to me more natural to control the content from the template so a designer can build views using "lego-blocks", without having to tweak the view.
Cheers, Sagi On Aug 1, 10:01 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > In the view.py code that you have calling your > frontpage_template.html, you should put your code to query the > database and generate your user list and articles. You would then > pass these to your html template via: > > return render_to_response('frontpage_template.html', > {'list_users':list_users,'latest_articles':latest_articles}) > > On Aug 1, 2:34 pm, sagi s <[EMAIL PROTECTED]> wrote: > > > I am trying to find a way to include a view in a template. The view > > generates an html snippet based on a DB query + another template. In > > pseudocode what I am trying to achieve is: > > > frontpage_template.html: > > {{% include header.html %}} > > {{% load /views/list_users %}} > > {{% load /views/latest_articles %}} > > ... > > > I tried loading a template instead and have that template issue an > > Ajax Updater request to a view upon loading but it seems like an > > overkill. > > > Any suggestions? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---