WebHelpers 0.6 reorganization

2008-04-30 Thread Mike Orr
I moved some things around in WebHelpers 0.6 to accommodate current and future growth. I wanted to get this done before release to avoid a backward-compatibility precedent. webhelpers.html is now a package. All HTML-related helpers will go in here, to distinguish them from text, date, collection

Re: Paginate module

2008-04-30 Thread Saibot
Sorry guye, false alarm: According to http://pyodbc.sourceforge.net/docs.html#cursor pyodbc does not support rowcount. On 30 Apr., 11:11, "Tobias Bender" <[EMAIL PROTECTED]> wrote: > Hi Christoph, > > > > items = meta.metadata.tables.get(table).select().order_by(column) > > > I'm no SQLAlchemy gu

Re: Recovering from a lost database link (SQLAlchemy)

2008-04-30 Thread Kumar McMillan
On Wed, Apr 30, 2008 at 6:03 AM, Christoph Haas <[EMAIL PROTECTED]> wrote: > Fellow earthicans... > > I had to restart my PostgreSQL service here and noticed that Pylons doesn't > recover properly. Instead of reconnecting to the database through > SQLAlchemy I just get "internal error"s all alo

Re: Recovering from a lost database link (SQLAlchemy)

2008-04-30 Thread Jimmy Hedman
2008/4/30, Christoph Haas <[EMAIL PROTECTED]>: > Fellow earthicans... > > I had to restart my PostgreSQL service here and noticed that Pylons doesn't > recover properly. Instead of reconnecting to the database through > SQLAlchemy I just get "internal error"s all along. > > Has anyone cared for a

Re: Pylons session in Model unit tests

2008-04-30 Thread Jonathan Vanasco
On Apr 30, 7:03 am, Pavel Skvazh <[EMAIL PROTECTED]> wrote: > Checking if the current user can > delete a certain letter (if he's the author of it) > should obviously be done inside the model, but where will I get the > user_id to check? Passing it to the > delete function looks just wrong to me.

Re: Extra / normalization

2008-04-30 Thread Ian Bicking
Yannick Gingras wrote: > Ian Bicking <[EMAIL PROTECTED]> writes: > >>> All you can do is include that value as parameter instead, or use >>> WSGI 2 (which of course doesn't exist yet, but somewhere we've penned >>> this 'feature' to be removed in version 2 of the spec). >> It's mentioned as a

Recovering from a lost database link (SQLAlchemy)

2008-04-30 Thread Christoph Haas
Fellow earthicans... I had to restart my PostgreSQL service here and noticed that Pylons doesn't recover properly. Instead of reconnecting to the database through SQLAlchemy I just get "internal error"s all along. Has anyone cared for a remedy to this problem? I know that SQLAlchemy doesn't no

Re: Pylons session in Model unit tests

2008-04-30 Thread Pavel Skvazh
Thanks a lot, Alberto! That works just fine. It's not a good practice indeed, but that's the best way, I could figure to do with user-specific stuff. For instance if we're dealing with mail, for get_incoming, get_sent, get_drafts etc I'll have to pass session['user_id'] from the controller to th

Re: Pylons session in Model unit tests

2008-04-30 Thread Alberto Valverde
Pavel Skvazh wrote: > I've been searching throught the docs to figure it out but there's no > clue. I've got a set up like Using SQLAlchemy with Pylons suggests > and my model relies on session, where current user_id is stored. > > Is there any way to access Pylons session in my model tests? Rely

Re: Paginate module

2008-04-30 Thread Tobias Bender
Hi Christoph, > > items = meta.metadata.tables.get(table).select().order_by(column) > > I'm no SQLAlchemy guru. But with SQLAlchemy 0.4.* that should just be: > >items = sqlalchemy.select([yourtable]) This is a generic aproach to display/browse data in tables, which are *not* defined in

Re: Paginate module

2008-04-30 Thread Christoph Haas
Hi, Tobias... On Dienstag, 29. April 2008, Saibot wrote: > I am using paginate and have some problems with it. > > Thats my controller code: > > items = meta.metadata.tables.get(table).select().order_by(column) I'm no SQLAlchemy guru. But with SQLAlchemy 0.4.* that should just be: items

Re: Extra / normalization

2008-04-30 Thread Yannick Gingras
Ian Bicking <[EMAIL PROTECTED]> writes: >> All you can do is include that value as parameter instead, or use >> WSGI 2 (which of course doesn't exist yet, but somewhere we've penned >> this 'feature' to be removed in version 2 of the spec). > > It's mentioned as an issue that WSGI 2 could add

Pylons session in Model unit tests

2008-04-30 Thread Pavel Skvazh
I've been searching throught the docs to figure it out but there's no clue. I've got a set up like Using SQLAlchemy with Pylons suggests and my model relies on session, where current user_id is stored. Is there any way to access Pylons session in my model tests? Thanks! --~--~-~--~~

AW: AW: Re: Crash after coockie expired

2008-04-30 Thread Andrew Smart
> -Ursprüngliche Nachricht- > Von: pylons-discuss@googlegroups.com > [mailto:[EMAIL PROTECTED] Im Auftrag von Ben Bangert > Gesendet: Dienstag, 29. April 2008 22:12 > An: pylons-discuss@googlegroups.com > Betreff: Re: AW: Re: Crash after coockie expired > > On Apr 29, 2008, at 9:18 AM, A