Hi there,<br><br>Thanks Steve Holden for organizing this, it&#39;s a great idea.<br><br>I&#39;ve been using twisted for about a year now and I love it,<br>I&#39;m a classic case of (as you can read all over the web):<br>&nbsp;&quot;after the learning curve, you&#39;ll love Twisted&quot;
<br>so, yeah, more learning materials would be great for those starting out.<br><br>Some nice topics might include:<br><br>a) Start off simple with a &quot;twisted.web2&quot; example (everyone &quot;gets&quot; http)<br><br>
b) then plug that into a simple sqlite database using &quot;twisted.enterprise&quot;<br><br>c) then plug some simple usage of &quot;twisted.pb&quot; that does something<br>&nbsp;&nbsp;&nbsp; in the backend, that gets presented to the pages being served by &quot;
twisted.web2&quot;<br><br>d) Show how using &quot;twistd&quot; is really convient <br>(i.e. &quot;twistd -ny server.tac&quot; and &quot;twistd -y server.tac&quot;, with some logging capability, etc)<br><br>Anyways, these are just random ideas, but they are things that took me a while to
<br>get going with, but now I find them so clean and useful.<br><br><br>Regarding Paul&#39;s post:<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I did something like that a few month back and had a hard time gathering<br>all the pieces of information ;) I still can&#39;t believe I have to parse<br>raw response strings to handle POST ;))</blockquote><div><br>You don&#39;t!&nbsp; This is all you need:
<br><br>from twisted.web2 import resource, http, http_headers<br><br>CTYPE = {&#39;content-type&#39;: http_headers.MimeType(&#39;text&#39;, &#39;html&#39;, {&#39;charset&#39;:&#39;utf-8&#39;})}<br><br>GetSomePostData(resource.PostableResource
):<br><br>&nbsp;&nbsp;&nbsp; def render(self, request):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; postval0 = request.args.get(&quot;val0&quot;, [&quot;&quot;])[0]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; postval1 = request.args.get(&quot;val1&quot;, [&quot;&quot;])[0]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; html = myhtmltemplates.comment_form_response
(postval0, postval1) #for example<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return http.Response(200, CTYPE, html)<br><br><br>- Alex<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>&nbsp;<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br>cheers<br><font color="#888888"> &nbsp;Paul<br></font><div><div></div><div class="Wj3C7c"><br><br><br>_______________________________________________<br>Twisted-Python mailing list<br><a href="mailto:Twisted-Python@twistedmatrix.com">
Twisted-Python@twistedmatrix.com</a><br><a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br></div></div></blockquote>
</div><br>