[Twisted-Python] stikiwiki promising, but...
Richard Jones
twisted-python@twistedmatrix.com
Tue, 6 May 2003 15:26:34 +1000
--Apple-Mail-6-877150716
Content-Type: multipart/mixed; boundary=Apple-Mail-5-877150712
--Apple-Mail-5-877150712
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
format=flowed
I randomly found stikiwiki (in short: ReST/Twisted/WikiWiki) on the
web, and thought it'd be extremely useful. Gave it a go, and had to
immediately patch up some docutils usage quirks (docutils' API is a bit
of a moving target ;). The results of my work are attached to this
email. Can't find an email address for the author though, so that's as
far as that patch goes :)
Problem is that I now run into some problem deep in the Twisted code.
The traceback is also attached. This is using the latest rc. If I
should try the CVS, just let me know. Otherwise, is there something
else that I could do?
Richard
ps. can't help thinking that Roundup would be nice running behind (or
is it inside?) Twisted :)
pps. stikiwiki: http://mithrandr.moria.org/code/stikiwiki/
--Apple-Mail-5-877150712
Content-Disposition: attachment;
filename=stikiwiki.py.diff
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
x-unix-mode=0444;
name="stikiwiki.py.diff"
--- stikiwiki.py.orig Tue May 6 15:11:39 2003
+++ stikiwiki.py Tue May 6 15:11:28 2003
@@ -290,11 +290,14 @@
def render(self, request):
pub = core.Publisher()
- pub.set_reader('restructuredtext', None, 'restructuredtext')
+ pub.set_reader('standalone', None, 'restructuredtext')
pub.set_writer('html')
- pub.set_options()
- pub.options._destination = ''
- pub.options.stylesheet = '/default.css'
+ pub.get_settings()
+ pub.settings._destination = ''
+ pub.settings.stylesheet = '/default.css'
+ pub.settings.report_level = 5
+ pub.settings.halt_level = 6
+ pub.settings.warning_stream = StringIO()
source = self.value
uri = request.uri
if not uri.endswith("/"):
@@ -305,12 +308,8 @@
`Edit this?`_
.. _`edit this?`: %s""" % (uri)
- pub.source = io.StringIO(pub.options, source = source)
- pub.destination = io.StringIO(pub.options)
- pub.options.report_level = 5
- pub.options.halt_level = 6
- warnings = StringIO()
- pub.options.warning_stream = warnings
+ pub.source = io.StringInput(pub.settings, source = source)
+ pub.destination = io.StringOutput(pub.settings)
return pub.publish()
def putChild(self, path, res):
--Apple-Mail-5-877150712
Content-Disposition: attachment;
filename=stikiwiki.py.log
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
x-unix-mode=0444;
name="stikiwiki.py.log"
Traceback (most recent call last):
File "/sw/lib/python2.2/site-packages/twisted/web/server.py", line 162, in render
body = resrc.render(self)
File "/sw/lib/python2.2/site-packages/twisted/web/woven/controller.py", line 202, in render
return self.renderView(request)
File "/sw/lib/python2.2/site-packages/twisted/web/woven/page.py", line 46, in renderView
doneCallback=self.gatheredControllers)
File "/sw/lib/python2.2/site-packages/twisted/web/woven/view.py", line 178, in render
self.handleDocument(request, self.d)
--- <exception caught here> ---
File "/sw/lib/python2.2/site-packages/twisted/web/woven/view.py", line 245, in handleDocument
self.handleOutstanding(request)
File "/sw/lib/python2.2/site-packages/twisted/web/woven/view.py", line 263, in handleOutstanding
self.handleNode(request, node)
File "/sw/lib/python2.2/site-packages/twisted/web/woven/view.py", line 563, in handleNode
returnNode = self.dispatchResult(request, node, view)
File "/sw/lib/python2.2/site-packages/twisted/web/woven/view.py", line 290, in dispatchResult
result = adapter.generate(request, node)
File "/sw/lib/python2.2/site-packages/twisted/web/woven/view.py", line 697, in generate
newNode = self.data.generate(request, node)
File "/sw/lib/python2.2/site-packages/twisted/web/woven/widgets.py", line 198, in generate
data = self.getData(request)
File "/sw/lib/python2.2/site-packages/twisted/web/woven/widgets.py", line 140, in getData
return self.model.getData(request)
exceptions.TypeError: getData() takes exactly 1 argument (2 given)
--Apple-Mail-5-877150712--
--Apple-Mail-6-877150716
content-type: application/pgp-signature; x-mac-type=70674453;
name=PGP.sig
content-disposition: inline
content-transfer-encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (Darwin)
iD8DBQE+t0eLrGisBEHG6TARAowwAJwODP1T03gwkOaDC4lR394aomdCGwCfcYMH
1HPzdeswDDvW2uj63d0LWc8=
=HQMg
-----END PGP SIGNATURE-----
--Apple-Mail-6-877150716--