Changeset 4053 for waeup/branches/ulif-rewrite/src
- Timestamp:
- 2 Apr 2009, 12:56:08 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-rewrite/src/waeup/viewlets.py
r3895 r4053 3 3 import zope.interface 4 4 from zope.component import getMultiAdapter 5 from interfaces import IUniversity, IWAeUPObject 5 from interfaces import IUniversity, IWAeUPObject, IWAeUPXMLExporter 6 6 7 7 grok.context(zope.interface.Interface) … … 23 23 grok.template('master') 24 24 25 class ExportXML(grok.View): 26 """Deliver an XML representation of the context. 27 """ 28 grok.name('export.xml') 29 grok.require('waeup.manageUniversity') 30 31 def render(self): 32 exporter = IWAeUPXMLExporter(self.context) 33 xml = exporter.export().read() 34 self.response.setHeader( 35 'Content-Type', 'text/xml; charset=UTF-8') 36 return xml 37 25 38 class Head(grok.ViewletManager): 26 39 """additions to HTML head"""
Note: See TracChangeset for help on using the changeset viewer.