Another option is to use AJAX to populate the "building block" areas.

e.g. (Using JQuery)
<html>
<head>
<script type="text/javascript" src="path/to/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $('#block1').load('/views/list_users');
    $('#block2').load('/views/latest_articles');
});
</script>
</head>
...
<body>
<div id="block1">&nbsp;</div>
<div id="block2">&nbsp;</div>
</body>
...
</html>

-Eric Florenzano

On Aug 1, 11:34 am, 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to