[Zope3-checkins] CVS: Zope3/src/zope/app/pagetemplate - viewpagetemplatefile.py:1.8
Marius Gedminas
mgedmin@codeworks.lt
Thu, 31 Jul 2003 12:49:12 -0400
Update of /cvs-repository/Zope3/src/zope/app/pagetemplate
In directory cvs.zope.org:/tmp/cvs-serv28988/src/zope/app/pagetemplate
Modified Files:
viewpagetemplatefile.py
Log Message:
ViewPageTemplateFile now accepts an optional content_type argument to the
constructor.
=== Zope3/src/zope/app/pagetemplate/viewpagetemplatefile.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/pagetemplate/viewpagetemplatefile.py:1.7 Tue May 27 10:18:20 2003
+++ Zope3/src/zope/app/pagetemplate/viewpagetemplatefile.py Thu Jul 31 12:48:38 2003
@@ -27,9 +27,11 @@
"""Page Templates used as methods of views defined as Python classes.
"""
- def __init__(self, filename, _prefix=None, usage=u''):
+ def __init__(self, filename, _prefix=None, usage=u'', content_type=None):
_prefix = self.get_path_from_prefix(_prefix)
super(ViewPageTemplateFile, self).__init__(filename, _prefix)
+ if content_type is not None:
+ self.content_type = content_type
self.usage = usage
def pt_getContext(self, instance, request, **_kw):