Attachment 'widget.py.diff'
Download 1 --- widget.py.orig 2007-03-08 15:28:21.000000000 +0200
2 +++ widget.py 2007-03-09 10:48:01.000000000 +0200
3 @@ -15,6 +15,7 @@
4 from MoinMoin.action import AttachFile
5 from MoinMoin.parser.wiki import Parser
6 from StringIO import StringIO
7 +from copy import copy
8 import re
9
10 # TupleList is based on Dict from MoinMoin.wikidict
11 @@ -203,17 +204,13 @@
12 else:
13 # Option 1b: It's wikiformatted
14 formattedwiki = StringIO()
15 - # The following is copied from MoinMoin._tests.test_parser_wiki
16 - request = RequestCLI()
17 +
18 + self.request.formatter.page = self.request.page
19 + request = copy(self.request)
20 request.redirect(formattedwiki)
21 - page = Page(self.request, 'ThisPageDoesNotExistsAndWillNeverBeReally')
22 - page.set_raw_body(unformattedPage)
23 - from MoinMoin.formatter.text_html import Formatter
24 - page.formatter = Formatter(request)
25 - request.formatter = page.formatter
26 - page.formatter.setPage(page)
27 -
28 - Parser(unformattedPage, request).format(page.formatter)
29 + request.page.set_raw_body(unformattedPage)
30 +
31 + Parser(unformattedPage, request).format(request.formatter)
32 menuHtml = formattedwiki.getvalue()
33 else:
34 # Option 2: It's an attachment
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.