Attachment 'PageAction.py'
Download 1 # -*- coding: iso-8859-1 -*-
2 """
3 MoinMoin - Create an action link
4
5 @copyright: 2004 by Johannes Berg <johannes@sipsolutions.de>
6 @license: GNU GPL, see COPYING for details.
7 """
8
9 def execute(macro, args):
10 items = args.split(',', 2)
11 if len(items) < 2:
12 text = items[0]
13 else:
14 text = items[1]
15 page = items[0].strip()
16 action = items[1].strip()
17 from MoinMoin import wikiutil
18 page = wikiutil.quoteWikinameURL(page)
19 url = '%s?action=%s' % (page, action)
20 return wikiutil.link_tag(
21 macro.request, url,
22 text
23 )
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.