Attachment 'xml.py'
Download 1 from MoinMoin import config, util, wikiutil
2 from MoinMoin.Page import Page
3 from MoinMoin.util import MoinMoinNoFooter, pysupport
4 '''
5 AlbertMa (Ma Jian) gmajian at gmail dot com
6 http://www.ieasy.org
7
8 output xml format with text/xml Content-type header
9 '''
10 def execute(pagename, request):
11 if not request.user.may.read(pagename):
12 Page(pagename).send_page(request)
13 return
14
15 request.http_headers(["Content-type: text/xml;charset=%s" % config.charset])
16
17 try:
18 page = Page(pagename, date=request.form['date'][0])
19 except KeyError:
20 page = Page(pagename)
21
22 request.write(page.get_raw_body())
23 raise MoinMoinNoFooter
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.