On 27 nov, 09:35, Allen <[email protected]> wrote:
> Dear Andy McKay
> Thanks for the input and you're right, I shouldn't do it this way.
>
> I use to use ZOPE for a couple of years and it has to abilities to
> integrate multiple static webpages just by write a tag with the static
> webpage filename similar to the filter tag.

ZPT or dtml ? I've done my share of Zope / ZPT (and still do when
someone points a gun at me), and from memory I don't see what you're
talking about...

> But I just started django
> a month ago and I didn't see function of this sort except for page
> inheritance.

Well, there's an include tag, but if that's not what you're after, you
can write your own cutom tag.

> I have consider using page inheritance but I just not use to it.

You should, definitly. Page inheritance work mostly like the "page
macro" pattern in ZPT - except it's way cleaner.

> That's why I place it in the database. This is just my temporary fix
> for the time being and I know eventually I find a problem with this
> way soon of later.

Well, putting template code in the DB is not necessarily totally dumb
- but you need to explicitely render it, which is not supported OOTB,
so you either have to do it in the view or write some custom tag /
filters to take care of the rendering.

You'll find relevant doc here:

http://docs.djangoproject.com/en/dev/ref/templates/api/#ref-templates-api
http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#howto-custom-template-tags

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
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