[ZPT] AttributeError
Leon de Heus
leon@pruts.nl
04 Dec 2001 13:32:23 +0100
What you try to store in the pagetemplate is not valid html. But it
allows you to store the source anyway. When you try to render the
pagetemplate it will show that error.
You can save an invalid template and the editable source will show the
error so you can correct it. I think this is done so you can easily save
pagetemplates through ftp or dav and correct your errors later.
Best,
Leon.
Op Tue 04-12-2001, om 13:06 schreef Magnus Heino:
>
> Am I doing something dumb, or should this go into the collector?
>
> /Magnus
>
>
>
> Python 2.1.1 (#1, Aug 13 2001, 19:37:40)
> [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-96)] on linux2
> Type "copyright", "credits" or "license" for more information.
> >>> from PageTemplates.PageTemplate import PageTemplate
> >>> pt = PageTemplate()
> >>> pt.write('<p')
> >>> pt()
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "/usr/lib/python2.1/site-packages/PageTemplates/PageTemplate.py",
> line 91, in __call__
> return self.pt_render(extra_context={'options': kwargs})
> File "/usr/lib/python2.1/site-packages/PageTemplates/PageTemplate.py",
> line 75, in pt_render
> raise PTRuntimeError, 'Page Template %s has errors.' % self.id
> AttributeError: id
> >>>
>
>
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://lists.zope.org/mailman/listinfo/zpt