Re: [Webware-discuss] Webware and multi-language support

2004-04-20 Thread Pawel J Maczewski
On Tue, 20 Apr 2004, Stanislav Peťko wrote: > Hi... > > I posted some example how I do it with gettext on a Wiki > (http://wiki.webwareforpython.org/). It's among Webware Recipes. > Thanks a lot. That's just what I need :) I'm gonna test it now, thanks. -- Pawel "Kender" Maczewski

Re: [Webware-discuss] Changing actions

2004-04-20 Thread Ian Bicking
Matt Feifarek wrote: There's a diagram in the docs for our FormKit that may help clarify the situation: http://dalchemy.com/opensource/formkit/architecture.html About half way down. For form processing, we changed pre-action and post-action to merge the lifecycle more closely back into the nor

RE: [Webware-discuss] Changing actions

2004-04-20 Thread Ben Parker
Ian Bicking wrote: > Aaron Held wrote: > > I like actions the way they are - they are very simple to understand. > > If you have a hello "Aaron" type app its easy to setup a servlet like > > > > def writeContent(self): > >self.write(' > name="_acctionHello"'); > > > > def hello(self): > >s

Re: [Webware-discuss] Changing actions

2004-04-20 Thread Matt Feifarek
Here is a proposal: 1. having a "default action" construct that defaults to None, but can be set in a SitePage. If an action is in the request, it's run instead of default. 2. There be a method in page that sets a redirect address, but DOES NOT end the transaction. I suggest .setRedirectURI( )

Re: [Webware-discuss] Changing actions

2004-04-20 Thread Aaron Held
Where it gets all annoying, though, is preAction and postAction, which are like an anemic form of the writeHTML, writeHead, writeTitle, writeStyleSheet etc. setup that Page has for normal requests. Or, where you don't want to write anything, but way to treat the action as an actio

Re: [Webware-discuss] Changing actions

2004-04-20 Thread Matt Feifarek
Ian Bicking wrote: I use 3 too, though I've sometimes added a "self.setup()" to my SitePage, and allowed servlets to override that instead of awake. It's more consistent because it has no trans argument, and I Agreed. We like that pattern, too. It's just basically adding a "postAwake" into th

Re: [Webware-discuss] Changing actions

2004-04-20 Thread Matt Feifarek
Ian Bicking wrote: Where it gets all annoying, though, is preAction and postAction, which are like an anemic form of the writeHTML, writeHead, writeTitle, writeStyleSheet etc. setup that Page has for normal requests. Or, where you don't want to write anything, but way to treat the action as a

Re: [Webware-discuss] Changing actions

2004-04-20 Thread Eric Radman
On 10:41 Tue 20 Apr , Ian Bicking wrote: > Aaron Held wrote: > >I like actions the way they are - they are very simple to understand. > >If you have a hello "Aaron" type app its easy to setup a servlet like > > > >def writeContent(self): > > self.write(' >name="_acctionHello"'); > > > >def he

Re: [Webware-discuss] mod_webkit2 and Python 2.3.3 on RedHat 9.0

2004-04-20 Thread Chris Barker
Eduardo Elgueta wrote: > If you run Webware with the AppServer script, you have to change the line > > /usr/bin/env python Launch.py ThreadedAppServer $* > > to > > /path/to/python2.3 Launch.py ThreadedAppServer $* or: /usr/bin/env python2.3 I do this for ALL my python scripts, that way I know wha

Re: [Webware-discuss] Webware and multi-language support

2004-04-20 Thread Stanislav Peťko
Hi... I posted some example how I do it with gettext on a Wiki (http://wiki.webwareforpython.org/). It's among Webware Recipes. Stano Pawel J Maczewski wrote: Hi, I was thinking about methods of making translations of the site I'm working on to languages other then Polish. 'Cause our transl

Re: [Webware-discuss] Changing actions

2004-04-20 Thread Ian Bicking
Aaron Held wrote: I like actions the way they are - they are very simple to understand. If you have a hello "Aaron" type app its easy to setup a servlet like def writeContent(self): self.write(''); def hello(self): self.write('Hello %s' % self.request().value('username','No User Name')) Wher

Re: [Webware-discuss] Webware and multi-language support

2004-04-20 Thread Ian Bicking
Pawel J Maczewski wrote: I was thinking about methods of making translations of the site I'm working on to languages other then Polish. 'Cause our translators are familiar with gettext, I'd like to use it. But since gettext uses environment locale settings to detect what language to serve, how wou

Re: [Webware-discuss] Changing actions

2004-04-20 Thread Aaron Held
I like actions the way they are - they are very simple to understand. If you have a hello "Aaron" type app its easy to setup a servlet like def writeContent(self): self.write(''); def hello(self): self.write('Hello %s' % self.request().value('username','No User Name')) If you need a more com

Re: [Webware-discuss] mod_webkit2 and Python 2.3.3 on RedHat 9.0

2004-04-20 Thread Eduardo Elgueta
Peter, If you run Webware with the AppServer script, you have to change the line /usr/bin/env python Launch.py ThreadedAppServer $* to /path/to/python2.3 Launch.py ThreadedAppServer $* If you use the webkit init script, change the python path and the launch line. Let me know if you need help

Re: [Webware-discuss] mod_webkit2 and Python 2.3.3 on RedHat 9.0

2004-04-20 Thread Scott Russell
Possibly I don't understand the problem, but you *should* be able to just change the path to python in AppServer. I do the following: $WEBWARE_PYTHON Launch.py ThreadedAppServer $* and then set WEBWARE_PYTHON in ~/.bash_profile to point to the python I want it to use. (In your case, /usr/local/