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.
  • [get | view] (2006-05-14 22:46:40, 153.0 KB) [[attachment:widget.png]]
  • [get | view] (2007-03-09 12:55:01, 1.4 KB) [[attachment:widget.py.diff]]
  • [get | view] (2008-02-03 15:35:32, 0.6 KB) [[attachment:widget.py.moin-1.6.0.diff]]
  • [get | view] (2006-08-07 07:54:32, 31.4 KB) [[attachment:widget.tar.gz]]
 All files | Selected Files: delete move to page copy to page

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