From gpereira at grintek.com Tue Jun 28 10:16:14 2005 From: gpereira at grintek.com (Gregory Pereira) Date: Tue, 28 Jun 2005 10:16:14 +0200 Subject: [Medusa-dev] Generating exe from Medusa Message-ID: Hi, we have written an application using the Twisted Framework to generate an Client Server. Is it easier to use Medusa? The reason i am asking is that we are having problems generating the exe for the application using the installed Twisted application. I assume Medusa is also a package that one installs? Have you got support to generate an exe using the Py2exe package? Regards Greg From abo at minkirri.apana.org.au Wed Jun 29 01:03:24 2005 From: abo at minkirri.apana.org.au (Donovan Baarda) Date: Tue, 28 Jun 2005 16:03:24 -0700 Subject: [Medusa-dev] Generating exe from Medusa In-Reply-To: References: Message-ID: <1119999804.17203.77.camel@warna.corp.google.com> On Tue, 2005-06-28 at 01:16, Gregory Pereira wrote: > Hi, > > we have written an application using the Twisted Framework to generate > an Client Server. > > Is it easier to use Medusa? probably not... maybe. Medusa is older, and more stable, but Twisted has been refactored again and again, so is more refined, and probably better documented. > The reason i am asking is that we are having problems generating the > exe for the application using the installed Twisted application. > > I assume Medusa is also a package that one installs? It is a collection of pure python modules. > Have you got support to generate an exe using the Py2exe package? I suspect that the reason you are having problems with Twisted is it's exensive support for different event-loops... probably some of which are C extension modules (guessing here). If that is the case, then you might have more luck with medusa. However, migrating Twisted code to medusa would not be that easy, as they are fairly different. Twisted is much better supported these days, so you might as well try and resolve the issues you are having with it through the Twisted lists etc. I would also deal with the Py2exe people... -- Donovan Baarda From haraldarminmassa at gmail.com Tue Jun 28 11:38:40 2005 From: haraldarminmassa at gmail.com (Harald Armin Massa) Date: Tue, 28 Jun 2005 11:38:40 +0200 Subject: [Medusa-dev] Generating exe from Medusa In-Reply-To: References: Message-ID: <7be3f35d050628023855a48db0@mail.gmail.com> Gregory, since around 9 months I am distributung inhose a medusa based application as py2exe created installer (on WIndows XP) It works quite well. Harald > > Is it easier to use Medusa? > > The reason i am asking is that we are having problems generating the > exe for the application using the installed Twisted application. > -- GHUM Harald Massa persuasion python postgresql Harald Armin Massa Reinsburgstra?e 202b 70197 Stuttgart 0173/9409607 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/medusa-dev/attachments/20050628/356b1a11/attachment.htm From edbiano at rocketmail.com Mon Jul 4 11:35:04 2005 From: edbiano at rocketmail.com (Eduardo Biano) Date: Mon, 4 Jul 2005 02:35:04 -0700 (PDT) Subject: [Medusa-dev] Medusa or Quixote configuration Message-ID: <20050704093504.56695.qmail@web41012.mail.yahoo.com> Hi, I got hold of a documentation that helped solved the problem. I was able to run Medusa but i encountered another problem. The problem is, that the web pages won't display the stylesheet, javascript and graphics. It cannot find the referenced (href) files. I changed the links to the files but to no avail. I don't know if I missed something in Medusa configuration. Server code: --------------------------------------- #!/usr/bin/env python try: from medusa import http_server, xmlrpc_handler except ImportError: print '\n' + '='*50 print 'medusa/ package not found; install it.' print '='*50 raise import asyncore from quixote.publish import Publisher from quixote.server import medusa_http from quixote import enable_ptl enable_ptl() # Server that exposes the links demo program on port 8080 PORT = 8080 # [1] print 'Now serving the qxdemo.links demo on port %i' % PORT server = http_server.http_server('', PORT) publisher = Publisher('quixote.hrmo') publisher.config.debug_log = "/tmp/debug" publisher.config.error_log = "/tmp/error" publisher.setup_logs() dh = medusa_http.QuixoteHandler(publisher, '/quixote/hrmo/medusa-server.py', server) server.install_handler(dh) asyncore.loop() ------------------------------------------- Please give some hints. Thanks again. Cheers! Ed Biano ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com From edbiano at rocketmail.com Mon Jul 4 05:02:29 2005 From: edbiano at rocketmail.com (Eduardo Biano) Date: Sun, 3 Jul 2005 20:02:29 -0700 (PDT) Subject: [Medusa-dev] Medusa or Quixote configuration Message-ID: <20050704030229.72577.qmail@web41005.mail.yahoo.com> Hi, I am new to Medusa and Quixote and was successful in configuring Quixote demo using CGI (http://localhost/cgi-bin/foo.cgi/). I would like to use Quixote demo in Medusa. The reason I would like to use Medusa because of potential speed problem with CGI. Can someone give me information or direct me to a documentation on how to configure Medusa or Quixote to make both work? Sorry, I googled and searched in the Medusa mailing archive but found none.Thank you in advance for your help. Cheers! Ed __________________________________ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail From edbiano at rocketmail.com Fri Jul 15 03:26:43 2005 From: edbiano at rocketmail.com (Eduardo Biano) Date: Thu, 14 Jul 2005 18:26:43 -0700 (PDT) Subject: [Medusa-dev] Quixote Submit button and browser Back button Message-ID: <20050715012644.14761.qmail@web41006.mail.yahoo.com> Hi, I am a Medusa and Quixote newbie, hacked the Quixote demo and created a small app. The app authenticates users, displays a form which users can fill and submit using a Submit button. It updates a database and then displays the home page. My problem is, when the home page is displayed and i hit the browser Back button the same form is displayed with all the information of the previous entry. And when i hit the Submit button it again updates the database. I would like to have the form page expired or any other solution you can suggest so that users cannot submit the form again without being authenticated. I read about _q_access and session but i cannot figure out how to do it. I think the browser Back button issue is different from the normal program flow. Please give some hints and thank you in advance. Cheers! Ed ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From haraldarminmassa at gmail.com Mon Jul 18 15:07:20 2005 From: haraldarminmassa at gmail.com (Harald Armin Massa) Date: Mon, 18 Jul 2005 15:07:20 +0200 Subject: [Medusa-dev] Quixote Submit button and browser Back button In-Reply-To: <20050715012644.14761.qmail@web41006.mail.yahoo.com> References: <20050715012644.14761.qmail@web41006.mail.yahoo.com> Message-ID: <7be3f35d050718060713ae5220@mail.gmail.com> Eduardo, isn't this THE usual problem with Web-Apps? :) You want to be sure that ONE PARTICULAR FORM only gets submitted once. So, make this form unique: add a HIDDEN input with a UNIQUE GUID (windows has a GUID in his API, there are MILLIONS of receipts out there, a MD5 of the current time.time() is quite fair) when logging Info to database, store this guid. If a form with the same guid is submitted, reject that information Add timeouts as appropriate (for example, each GUID is only valid for 0,5 hours) Harald 2005/7/15, Eduardo Biano : > > Hi, > > I am a Medusa and Quixote newbie, hacked the Quixote > demo and created a small app. The app authenticates > users, displays a form which users can fill and > submit using a Submit button. It updates a database > and then displays the home page. > > My problem is, when the home page is displayed and i > hit the browser Back button the same form is displayed > with all the information of the previous entry. And > when i hit the Submit button it again updates the > database. > > I would like to have the form page expired or any > other solution you can suggest so that users cannot > submit the form again without being authenticated. I > read about _q_access and session but i cannot figure > out how to do it. I think the browser Back button > issue is different from the normal program flow. > > Please give some hints and thank you in advance. > > Cheers! > Ed > > > > ____________________________________________________ > Start your day with Yahoo! - make it your home page > http://www.yahoo.com/r/hs > > _______________________________________________ > Medusa-dev mailing list > Medusa-dev at python.org > http://mail.python.org/mailman/listinfo/medusa-dev > -- GHUM Harald Massa persuasion python postgresql Harald Armin Massa Reinsburgstra?e 202b 70197 Stuttgart 0173/9409607 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/medusa-dev/attachments/20050718/e47f08b5/attachment.htm From vsddbph at hotmail.com Wed Aug 10 08:21:12 2005 From: vsddbph at hotmail.com (Gracie Lockett) Date: Wed, 10 Aug 2005 10:21:12 +0400 Subject: [Medusa-dev] re [19] Message-ID: <20050810053026.919871E4002@bag.python.org> An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/medusa-dev/attachments/20050810/43c165ee/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: astor.GIF Type: image/gif Size: 10533 bytes Desc: not available Url : http://mail.python.org/pipermail/medusa-dev/attachments/20050810/43c165ee/astor.gif From pp at myelin.co.nz Wed Aug 10 08:05:39 2005 From: pp at myelin.co.nz (Phillip Pearson) Date: Wed, 10 Aug 2005 18:05:39 +1200 Subject: [Medusa-dev] Quixote Submit button and browser Back button In-Reply-To: <7be3f35d050718060713ae5220@mail.gmail.com> References: <20050715012644.14761.qmail@web41006.mail.yahoo.com> <7be3f35d050718060713ae5220@mail.gmail.com> Message-ID: <20050810060539.GA16339@myelin.co.nz> A good trick is to make the page that accepts the form return a 302 redirect to somewhere. This makes the form submission disappear from the 'back' history, and means that if someone hits the refresh button, the form doesn't get submitted again. These are the two big problems. I'm not sure if that made sense, so here's an example: You have a weblog comments page, /comments. Someone enters a comment in the form, then clicks "POST". The browser POSTs the form to /new-comment, which saves it in the database then returns a 302 redirect to /comments. The browser picks this up and displays the /comments page rather than /new-comment. This is something that pretty much every well-written web app does... it's really worthwhile. Cheers, Phil :) On Mon, Jul 18, 2005 at 03:07:20PM +0200, Harald Armin Massa wrote: > Eduardo, > > isn't this THE usual problem with Web-Apps? :) > > You want to be sure that ONE PARTICULAR FORM only gets submitted once. > > So, make this form unique: > > add a HIDDEN input with a UNIQUE GUID (windows has a GUID in his API, there > are MILLIONS of receipts out there, a MD5 of the current time.time() is > quite fair) > > when logging Info to database, store this guid. If a form with the same guid > is submitted, reject that information > > Add timeouts as appropriate (for example, each GUID is only valid for 0,5 > hours) > > Harald > > > 2005/7/15, Eduardo Biano : > > > > Hi, > > > > I am a Medusa and Quixote newbie, hacked the Quixote > > demo and created a small app. The app authenticates > > users, displays a form which users can fill and > > submit using a Submit button. It updates a database > > and then displays the home page. > > > > My problem is, when the home page is displayed and i > > hit the browser Back button the same form is displayed > > with all the information of the previous entry. And > > when i hit the Submit button it again updates the > > database. > > > > I would like to have the form page expired or any > > other solution you can suggest so that users cannot > > submit the form again without being authenticated. I > > read about _q_access and session but i cannot figure > > out how to do it. I think the browser Back button > > issue is different from the normal program flow. > > > > Please give some hints and thank you in advance. > > > > Cheers! > > Ed > > > > > > > > ____________________________________________________ > > Start your day with Yahoo! - make it your home page > > http://www.yahoo.com/r/hs > > > > _______________________________________________ > > Medusa-dev mailing list > > Medusa-dev at python.org > > http://mail.python.org/mailman/listinfo/medusa-dev > > > > > > -- > GHUM Harald Massa > persuasion python postgresql > Harald Armin Massa > Reinsburgstra?e 202b > 70197 Stuttgart > 0173/9409607 > _______________________________________________ > Medusa-dev mailing list > Medusa-dev at python.org > http://mail.python.org/mailman/listinfo/medusa-dev