Re: mod_wsgi does not check for changed files?

2008-06-28 Thread Shannon -jj Behrens
On Fri, Jun 27, 2008 at 12:53 PM, webwurst [EMAIL PROTECTED] wrote: Hi! If i start a pylons project with paster i can add the parameter -- relaod, so changes to the source code are reflected directly. But i'm using mod_wsdi now and i have to restard apache if i want changes in a python file

Re: Testing with the session object

2008-06-28 Thread Shannon -jj Behrens
On Fri, Jun 27, 2008 at 6:33 AM, Marin [EMAIL PROTECTED] wrote: I have this controller: class HeplController(BaseController): def index(self): del session['user'] session.save() return 'OK' And I want to test if it works correctly with this test: class

Re: com to co.uk with url_for

2008-06-28 Thread Shannon -jj Behrens
Pass qualified=True to url_for. -jj On Wed, Jun 25, 2008 at 7:26 AM, Nico Nicolic [EMAIL PROTECTED] wrote: Ok, I've created my own solution with regular expression. But the problem is, when I'm trying to get the existing URL with url_for(), it's just returns the relative url: /, but I need

Re: Testing with the session object

2008-06-28 Thread Jonathan Vanasco
On Jun 28, 7:18 am, Shannon -jj Behrens [EMAIL PROTECTED] wrote:  * Use one action to put something into the session and then another to make use of the session.  It's a work flow. I've always thought that Pylons should have something that does that. ie: instead of being a beaker object,

Re: Pylons session in Model unit tests

2008-06-28 Thread Marin
class MyMockSession(dict): def save(*args, **kw): pass etc, ... from pylons import session session._push_object(MyMockSession(user_id=fooo)) You might want to place that in the setUp method and place the followiing in the tearDown this: session._pop_object() It

Re: Testing with the session object

2008-06-28 Thread Wichert Akkerman
Previously Mike Orr wrote: On Sat, Jun 28, 2008 at 7:19 AM, Jonathan Vanasco [EMAIL PROTECTED] wrote: On Jun 28, 7:18 am, Shannon -jj Behrens [EMAIL PROTECTED] wrote: * Use one action to put something into the session and then another to make use of the session. It's a work flow.

Re: Testing with the session object

2008-06-28 Thread Marin
The first method you describe seem to clash with the concept of unit testing. I found something here: http://groups.google.com/group/pylons-discuss/browse_thread/thread/ec52fe65b960567/12b36231ff4dfb97?hl=enlnk=gstq=unit#12b36231ff4dfb97 But it does not work correctly, at least in pylons

Re: Routes - show formatted resource

2008-06-28 Thread Ben Bangert
On Jun 24, 2008, at 9:43 PM, Sok Ann Yap wrote: This can be fixed by reversing the order of the last 2 connect lines in routes/mapper.py. Once reversed, 12 will be assigned to id and json will be assigned to format. Thanks for the patch, there was also an issue with some of the other

Sanitizing User Input

2008-06-28 Thread Jonathan Vanasco
I need to sanitize user input for 'comments' and 'postings'. Can anyone suggest good ways to handle this? Browsing the web and other projects, it seems most people do this: - use beautiful soup ( which i think might be overkill ) - use a sanitize function from sam ruby's mombo/post.py (

Beaker session API feature request

2008-06-28 Thread askel
Hello everyone, I'm not sure if it is the right place to ask this question but trac at http://beaker.groovie.org/ seems to be virgin. Long story short. There is need for some API to enumerate all Beaker sessions. Sessions are very useful when one needs to transform stateless HTTP protocol into