[TurboGears] Re: With whom do you guys host with?

2005-10-08 Thread Scott Benjamin
Has there been any progress on an offical deployment scenario? I'd like to throw up some turbogears apps on my site, which doesn't allow fastcgi, and I'm wondering what my options would be. Also, I just found Turbo Gears last night, stayed up for 3 hours longer than I should have just looking

[TurboGears] Re: With whom do you guys host with?

2005-10-08 Thread Scott Benjamin
Whoops.. just after I posted that I found this: http://www.turbogears.org/docs/deployment.html heh.. Thanks, Scott

[TurboGears] How to install TG on a webhost without root access?

2005-10-08 Thread Scott Benjamin
What's the preferred method of installing TurboGears on a webhost where I don't have root access? Scott

[TurboGears] Re: How to install TG on a webhost without root access?

2005-10-08 Thread Kevin Dangoor
Hi Scott, This is something on my todo list to experiment with and write up. In the meantime, you should take a look at Phillip Eby's instructions for non-root installations using setuptools: http://peak.telecommunity.com/DevCenter/EasyInstall#non-root-installation Kevin On 10/8/05, Scott

[TurboGears] Re: With whom do you guys host with?

2005-10-08 Thread Kevin Dangoor
Yeah, that document is woefully inadequate, but will get you somewhere. The non-root installation instructions I just sent, plus using mod_proxy (ProxyPass/ProxyPassReverse) or mod_rewrite should get you a chunk of the way there. Kevin On 10/8/05, Scott Benjamin [EMAIL PROTECTED] wrote:

[TurboGears] Re: 0.8a1 incompatible with formencode 0.23dev ?

2005-10-08 Thread Krys Wilken
This one exists in 0.5 as well, I was going to mention it. You need to have a def validation _error method as the TG code works for that case but the if the method does not exist, the default raise a traceback code is missing arguments. I never bothered to figure out the fix, though. I just

[TurboGears] Re: How does the current validator mechanism works ?

2005-10-08 Thread Krys Wilken
I agree completely. In my project my validation_error method has to do just that: recall the original method with all arguments + and errors argument. This seems the best approach and the code is fairly boiler plate. It would be nice to see this as the default behaviour in TG. Krys [EMAIL

[TurboGears] Re: How does the current validator mechanism works ?

2005-10-08 Thread Jeff Watkins
What about a nested validation_error function. For example: @turbogears.expose( validators= mySchema() ) def index( self, arg1, arg2 ) def validation_failed( errors ): # do something clever here and ultimately # either retry index or bail

[TurboGears] Re: Auth spec

2005-10-08 Thread Krys Wilken
I like this. I think groups are useful for organizational purposes on larger scale apps, but roles is a better conceptual idea for permission assignment and requirement. I actually like Zope's User, Group and Role 3-way system, complicated though it is. it's great for large scale systems like

[TurboGears] Re: Building from subversion

2005-10-08 Thread Krys Wilken
It might be worth noting that easy_install.py -f . (note the period, i.e. current directory) works. -f can use local paths as well as urls. At work we have MS Proxy (NTLM auth) and McAfee WebShield, so downloading anything is a royal pain. I really like setuptools, but having a download and

[TurboGears] Re: How does the current validator mechanism works ?

2005-10-08 Thread Krys Wilken
Ian Bicking wrote: [EMAIL PROTECTED] wrote: [snip] If validator_error is defined, if will be called with the first parameter being the original function(the one that turbogears.expose supposed to be decorating). While the documentation said I can do whatever I want, I think it would be

[TurboGears] Re: turbogears-admin shell initial data file

2005-10-08 Thread Krys Wilken
This works for me. :-) As for you point 1), if there is no tg_init_database, then the behaviour is exactly as before and SQLObject users will not be confused. That is to say, I have to do an explicit act to get the new behaviour and so I will know what will happen. As for point 2), I am

[TurboGears] Re: How does the current validator mechanism works ?

2005-10-08 Thread Krys Wilken
Exactly. Validation errors are not usually programming errors. They are usually user input errors. Telling the user that they have inputted invalid data should be simple and intuitive. A separate method for error handling is not intuitive to me. :-) Krys [EMAIL PROTECTED] wrote: To me it

[TurboGears] 'quickstart' error handling

2005-10-08 Thread Mike Harding
The quickstart project template has the interesting feature, inherited, I guess, from CherryPy... If you access 'http://localhost:8080/?var=5' you get the ugly display: Traceback (most recent call last): File

[TurboGears] MochiKit 0.90 released

2005-10-08 Thread Bob Ippolito
MochiKit 0.90 http://mochikit.com/download.html has been released! This release includes a new feature, some bug fixes. The new feature in 0.90 is JSON serialization and evaluation support via serializeJSON, evalJSON and registerJSON. 2005-10-08 v0.90 - Fixed ISO compliance with

[TurboGears] Re: turbogears.flash() only displays every other call

2005-10-08 Thread Krys Wilken
I ran into this too. I don't know if the behaviour is a bug, or just if we are misinterpreting the intended purpose of flash. How flash works is to set a cookie which is sent to the browser. The message only gets displayed when the cookie comes back from the browser. The cookie is then

[TurboGears] Re: How does the current validator mechanism works ?

2005-10-08 Thread Krys Wilken
Interesting idea. :-) I am unsure what benefit it provides over just say just having an extra errors=None argument on the original method. I'd love to hear your thoughts on it though. :-) It seems to me that that there are two simple ways of handling validation errors: 1) Adding an

[TurboGears] Re: 'quickstart' error handling

2005-10-08 Thread Krys Wilken
What I like to do is add *args and **kwargs to controller methods, precisely for that reason. e.g. def index(self, expected_var, ..., *args, **kwargs): That way I catch any extra argument passed in and I can either ignore them or present the error in a friendlier way. Not sure if there are

[TurboGears] Re: How does the current validator mechanism works ?

2005-10-08 Thread [EMAIL PROTECTED]
Agree. In its(TurboGears) current form, I have changed all my functions to this form(thus ignore the validator feature) : func(self,**kwargs): Then I can define a formencode schema to validate against kwargs which is a dict. Basically achieve what you mentioned. The only issue is, a few line of

[TurboGears] Re: turbogears.flash() only displays every other call

2005-10-08 Thread Tim Lesher
On 10/8/05, Krys Wilken [EMAIL PROTECTED] wrote: I ran into this too. I don't know if the behaviour is a bug, or just if we are misinterpreting the intended purpose of flash. How flash works is to set a cookie which is sent to the browser. Aha. That's the problem. That means I was

[TurboGears] Re: Validator and None ?

2005-10-08 Thread Ian Bicking
[EMAIL PROTECTED] wrote: Is there a way to specify that None(empty, not present) is valid ? Something equivalent to : if my_string is None or my_string==: v = None else: v = validator.to_python(my_string) v = validator(if_empty=None).to_python(my_string) Note that you can clone any