xmlhttprequest + json + pylons

2007-11-06 Thread Alagu Madhu
Hi JSONRequest = { post: function( url, data, callback, timeout ) { xhr = new XMLHttpRequest(); xhr.open(POST, url, true); xhr.setRequestHeader( Content-Type, application/x-www-form- urlencoded ); if (callback) { xhr.onreadystatechange =

WSGIController.__call__ and error handling

2007-11-06 Thread Max Ischenko
Hello, I want to write a generic error handler which will display meaningful page to the user in case some particular error occurs. I have tried to override WSGIController.__call__ using the following code but it doesn't work: try: return WSGIController.__call__(self,

Re: Having pylons.render() to return Unicode

2007-11-06 Thread Yannick Gingras
Philip Jenvey [EMAIL PROTECTED] writes: Most if not all Buffet plugins (I'm not sure about Genshi or breve's) are pretty much hardcoded to only return raw strings. Unfortunately this is just how it's always been done with Buffet. I had APIs developed by people who never use Unicode. It

AutoConnectHub and doInTransaction bug

2007-11-06 Thread programmer.py
I know that pylons.database is about to be deprecated, but I've run across a bug (Im using 0.9.6.1). I'm posting this as a heads up for anyone else that may run into this. (I've also posted something in the pylons trac http://pylonshq.com/project/pylonshq/ticket/327) If you: 1) use the

Re: About paste traceback emails

2007-11-06 Thread Ian Bicking
Yannick Gingras wrote: I have two questions regarding the backtrace emails that paste sends: 1) how do you disable them? Don't set the email address in your configuration. 2) how do you send them without unwinding the stack? You have to hook into what errormiddleware calls,

Classic URL Style

2007-11-06 Thread Humberto Diógenes
Hi! I'm trying to port an existing mod_python app to Pylons, but had some trouble with Routes. I'd like to keep using URLs the same classic URL style: http://localhost/location/edit?location_id=123 And then have Pylons receive it as arguments for the controller method: code class

Re: Classic URL Style

2007-11-06 Thread Alberto Valverde
Humberto Diógenes wrote: Hi! I'm trying to port an existing mod_python app to Pylons, but had some trouble with Routes. I'd like to keep using URLs the same classic URL style: http://localhost/location/edit?location_id=123 And then have Pylons receive it as arguments for the

Re: Classic URL Style

2007-11-06 Thread Humberto Diógenes
On Nov 6, 5:56 pm, Jonathan LaCour [EMAIL PROTECTED] wrote: This past weekend, I participated in a sprint on Pylons where we implemented two new controllers: DecoratedController and ObjectDispatchController. Both of these controllers perform parameter injection. Here is an example of a

Re: Classic URL Style

2007-11-06 Thread Jose Galvez
Thanks for the correction Mike Jose Mike Orr wrote: On 11/6/07, Jose Galvez [EMAIL PROTECTED] wrote: you could add for k,v in request.params: locals()[k] = v to the top f your functions this would inject the variable names into your functions do you could use them directly.

Re: Classic URL Style

2007-11-06 Thread Mike Orr
On 11/6/07, Jose Galvez [EMAIL PROTECTED] wrote: you could add for k,v in request.params: locals()[k] = v to the top f your functions this would inject the variable names into your functions do you could use them directly. You can't modify local variables via locals(). Local

Re: Classic URL Style

2007-11-06 Thread Jonathan LaCour
Mike Orr wrote: The dictionary you return in the controller method will be used as the namespace for your template. Are 'c' and the other Pylons variables implicitly added? As of right now, they are not. You will have to return them as part of the dictionary that is sent to your

Temporary mailing list to send multiple emails

2007-11-06 Thread Daniele Paolella
Hi list. This is not Pylons-specific but I think a sort of ensamble point of view is needed, and since I'm working with the framework and strongly agree with its principles, here it is. I want to email thousands recipients from my application; in despite of ease I need the user to send the

Re: Classic URL Style

2007-11-06 Thread Mike Orr
On 11/6/07, Jonathan LaCour [EMAIL PROTECTED] wrote: The dictionary you return in the controller method will be used as the namespace for your template. Are 'c' and the other Pylons variables implicitly added? -- Mike Orr [EMAIL PROTECTED]

Re: Classic URL Style

2007-11-06 Thread Mike Orr
On 11/6/07, Humberto Diógenes [EMAIL PROTECTED] wrote: I pulled the latest version from the repository but couldn't use it. ### Existing project: URL: http://localhost:5000/location/index File '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/

Re: Classic URL Style

2007-11-06 Thread Humberto Diógenes
On 06/11/2007, at 20:22, Mike Orr wrote: On 11/6/07, Humberto Diógenes [EMAIL PROTECTED] wrote: ### Existing project: URL: http://localhost:5000/location/index [...] KeyError: 'wsgiorg.routing_args' This is going to be a recurring problem with Pylons-dev. When upgrading an app from

Re: Classic URL Style

2007-11-06 Thread Mike Orr
On Nov 6, 2007 4:19 PM, Humberto Diógenes [EMAIL PROTECTED] wrote: I think there's something wrong with the install scripts. When I ran easy_install . again, the templates were gone from site-packages. is it possible to easy_install a development version in Mercurial? I used python setup.py

db update notifier for pylons app

2007-11-06 Thread kettle
Hi, I am fairly new to pylons and have what may be a simple implementation question. I have an html table which displays the (partial) contents of a database, and I would like to dynamically, and parsimoniously update this table each time an entry is added to the database. The first,

Re: db update notifier for pylons app

2007-11-06 Thread kettle
Also, I am using sqlalchemy with pylons. kettle wrote: Hi, I am fairly new to pylons and have what may be a simple implementation question. I have an html table which displays the (partial) contents of a database, and I would like to dynamically, and parsimoniously update this table each