On 12/10/06, MerMer <[EMAIL PROTECTED]> wrote: > > As a follow on. Can I:- > > Combine all three templates by using inheritance between the templates. > > Unfortunately, I haven't been able to test this yet - because I can't > get the "extend tag" to work (see other post). I am assuming that it > won't work because of the following. Could someone confirm that this is > right. > > 1. The URL points to the View, which in turn points to a child > template. > 2. The view sets the context for the child template so that the child > template is filled with with the correct data. > 3. The child template extends the parent template. However, I don't > see how the parent template calls a view (isn't this the role of the > URL?), so the parent template cannot be populated with dynamic data > from a seperate view. Is this right? > > I'm struggling to get the bigger picture. It would be really helpful > if the tutorial had a slightly more complex example, which showed how > to create templates which draw data from different tables. >
Two things that I'd do. If it's a one off that you'll want to have a list of stuff in these models then just make a view. Otherwise I would recomment writing an inclusion tag for the tempatating system for each model. Information about inclusion tags can be found here (http://www.djangoproject.com/documentation/templates_python/#inclusion-tags). > MerMer > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---