StatusCodeRedirect original_request

2009-02-17 Thread andres
Hi All, I'm using Pylons 0.9.7 StatusCodeRedirect middleware to display custom error documents and I can't find the original request in the environment. Does anybody know how I can access the original request after a status code redirect? Thanks, Andres

Re: help installing on GAE 1.1.9

2009-02-17 Thread Bayle
Thanks a bunch! I think I found the problem. In paste-deploy.py, the command import site occurs before sys.path is altered. Changing this fixes the problem. ischenko noticed this previously, but until I understood what was going on a little better, thanks to your explanation, I hadn't thought

Re: pylons and hoteditor

2009-02-17 Thread Tomasz Nazar
As far as I understand I have similar problem. Here's solution. (The topic it's not related to Pylons at all ;) Instead of direct output of i18n key's value: var x = '${_('my.key')} I do: * use Jquery to simplify (not required) * use mix of HTML/JS helpers A) Create html list of all keys

Re: pylons and hoteditor

2009-02-17 Thread Przemek Chudzinski
I've fixed my problem using a simplier way :) ${h.textarea('db_content', style='visibility: hidden;')} script language=JavaScript type=text/javascript var getdata =document.getElementById(db_content).value; Instantiate(min,editor, getdata

timestamp in error reporting?

2009-02-17 Thread Jonathan Vanasco
Going through logs during testing to find bugs, i noticed that the errors don't include the a timestamp/datetime item is there any way to make that happen, either hardcoded in or pulling in the format from the logger configuration? The error reports i'm talking about are the ones with the

Sqlalchemy: querying table in different functions gives different results

2009-02-17 Thread Bryan
1. Client calls login(), a new row is inserted in the token table. 2. Client calls anotherFunction and the new row is not visible inside that function 3. If I place a Session.commit() in anotherFunction, then I can see the row def login(self, user, pass): ' Create new login entry that gives

Re: Sqlalchemy: querying table in different functions gives different results

2009-02-17 Thread Wichert Akkerman
Previously Bryan wrote: 1. Client calls login(), a new row is inserted in the token table. 2. Client calls anotherFunction and the new row is not visible inside that function 3. If I place a Session.commit() in anotherFunction, then I can see the row def login(self, user, pass): '

Re: Sqlalchemy: querying table in different functions gives different results

2009-02-17 Thread Brennan Todd
Which database are we talking about here? On Tue, Feb 17, 2009 at 2:13 PM, Bryan bryanv...@gmail.com wrote: It is called in a separate web request. I am using scoped_session, so if the 2 requests were on the same thread, they should use the same session. I don't think the 2 requests are on

Re: Sqlalchemy: querying table in different functions gives different results

2009-02-17 Thread Bryan
MySQL. According to the Lifespan of a Contextual Session section @ http://www.sqlalchemy.org/docs/05/session.html#contextual-thread-local-sessions Each web request should be getting a new session. That makes sense, I am calling Session.remove() at the end of the WSGIController.__call__ () I am

Re: Sqlalchemy: querying table in different functions gives different results

2009-02-17 Thread Bryan
SOLVED: I mentioned in my first post that I was using the XMLRPCController. Well, in my BaseController that inherits from WSGIController, I properly call Session.remove() at the end of each request, which gets rid of the session completely, and each request starts with a new fresh session.

Sprint at PyCon?

2009-02-17 Thread Matt Feifarek
Hi Gang(s). Will there be any sprint(s) for pylons and pylons-related projects (routes, webhelpers, paste) at PyCon next month? The PyCon website doesn't seem to think so, but it doesn't seem to know much, so I thought I'd ask. Thanks. --~--~-~--~~~---~--~~ You

Re: Sprint at PyCon?

2009-02-17 Thread Mike Orr
On Tue, Feb 17, 2009 at 2:46 PM, Matt Feifarek matt.feifa...@gmail.com wrote: Hi Gang(s). Will there be any sprint(s) for pylons and pylons-related projects (routes, webhelpers, paste) at PyCon next month? Yes, but what exactly we'll be working on has not been decided. Last year we had a

Re: Sprint at PyCon?

2009-02-17 Thread Matt Feifarek
On Tue, Feb 17, 2009 at 6:28 PM, Mike Orr sluggos...@gmail.com wrote: Will there be any sprint(s) for pylons and pylons-related projects (routes, webhelpers, paste) at PyCon next month? Yes, but what exactly we'll be working on has not been decided. Cool! I plan to attend PyCon, and

RE: Newbie Question: For loops in controllers broken/requires a hack?

2009-02-17 Thread chris van
Thanks for the response Mike, I used print only as an example, my actual application code doesn't use print at all. I replaced the print statement with a call to log.debug such that the code now looks like this: ... for i in range(10) log.debug(i) ... I am now getting the same error as

Re: Newbie Question: For loops in controllers broken/requires a hack?

2009-02-17 Thread Paweł Stradomski
W liście chris van z dnia środa, 18 lutego 2009: Thanks for the response Mike, I used print only as an example, my actual application code doesn't use print at all. I replaced the print statement with a call to log.debug such that the code now looks like this: ... for i in range(10)

Re: StatusCodeRedirect original_request

2009-02-17 Thread Ben Bangert
On Feb 17, 2009, at 12:29 AM, andres wrote: I'm using Pylons 0.9.7 StatusCodeRedirect middleware to display custom error documents and I can't find the original request in the environment. Does anybody know how I can access the original request after a status code redirect? There was a

Re: Newbie Question: For loops in controllers broken/requires a hack?

2009-02-17 Thread Mike Orr
On Tue, Feb 17, 2009 at 3:47 PM, chris van chrisv...@hotmail.com wrote: Thanks for the response Mike, I used print only as an example, my actual application code doesn't use print at all. I replaced the print statement with a call to log.debug such that the code now looks like this: ...

Question about controllers and __before__() method

2009-02-17 Thread JY
Is it safe to set attributes to be used in the controller action from the __before__() method? Also how do I indicate that the action should be called or not, as stated by the doc: This method is called before your action is, and should be used for setting up variables/objects, restricting

Re: Question about controllers and __before__() method

2009-02-17 Thread Mike Orr
On Tue, Feb 17, 2009 at 5:53 PM, JY jyou...@gmail.com wrote: Is it safe to set attributes to be used in the controller action from the __before__() method? Yes. The controller is instantiated for each request, so all attributes are local to the request. Also how do I indicate that the

Re: issue on upgrading to 0.9.7

2009-02-17 Thread Max Ischenko
      import OpenSnPylons       h = getattr(__import__( '%s.lib' % OpenSnPylons.appname , {}, {}, ['']), 'helpers')       model = getattr(__import__(OpenSnPylons.appname, {}, {}, ['']), 'model') This works perfectly on 0.9.6 - using it on multiple production sites. On 0.9.7 , a paster