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.
  • [get | view] (2011-06-19 19:43:50, 1.3 KB) [[attachment:Card-1v9.tgz]]
  • [get | view] (2006-04-03 20:47:20, 0.6 KB) [[attachment:PageAction.py]]
  • [get | view] (2006-04-03 21:00:21, 7.1 KB) [[attachment:ScreenCardComments.png]]
  • [get | view] (2006-04-03 20:59:51, 8.9 KB) [[attachment:ScreenCardDraft.png]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.