annotate MoinMoin/macro/AttachInfo.py @ 3244:886b8969dbc6

fix some unit tests
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 12 Mar 2008 01:08:43 +0100
parents 03b3c6fd70e3
children
rev   line source
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1 """
2711
24bc1ad80e80 macro.AttachInfo: fixed docstring
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 950
diff changeset
2 MoinMoin - AttachInfo Macro
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
3
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
4 A macro to produce information about attached pages
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
5
2725
388204baf00f change [[macro]] to <<macro>> in all built-in markup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 950
diff changeset
6 Usage: <<AttachInfo>>
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
7
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
8 @copyright: 2004 Jacob Cohen, Nigel Metheringham
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
9 @license: GNU GPL, see COPYING for details
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
10 """
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
11
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
12 from MoinMoin.action.AttachFile import info
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
13
3241
03b3c6fd70e3 changed to new arg parser
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2754
diff changeset
14 def macro_AttachInfo(macro, pagename=None):
03b3c6fd70e3 changed to new arg parser
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2754
diff changeset
15 """ generates info how much attachments stored on a page """
03b3c6fd70e3 changed to new arg parser
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2754
diff changeset
16 if not pagename:
03b3c6fd70e3 changed to new arg parser
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2754
diff changeset
17 pagename = macro.formatter.page.page_name
3244
886b8969dbc6 fix some unit tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3241
diff changeset
18
3241
03b3c6fd70e3 changed to new arg parser
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2754
diff changeset
19 return info(pagename, macro.request)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
20
3241
03b3c6fd70e3 changed to new arg parser
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2754
diff changeset
21