Re: [TurboGears] Digest for turbogears@googlegroups.com - 14 Messages in 4 Topics

4 views
Skip to first unread message

Marco Mariani

unread,
Jan 29, 2010, 5:43:34 AM1/29/10
to turbo...@googlegroups.com
On 01/29/2010 11:23 AM, turbogear...@googlegroups.com wrote:
 
    I *think* this is because you need to have the name SQLAlchemy defined in the
    module you define the handler in. So do you import it in your controller
    file?

This was how it behaved some time ago.

Actually, in TG 1.1b3 - the one I'm using - I have to add stuff to the tg.errorhandling module, in order for it to be recognized inside the exception_handler

Just call this, somewhere:

import turbogears as tg
import sqlalchemy as sa

tg.errorhandling.SQLAlchemyError = sa.exceptions.SQLAlchemyError


works for me

-- 
This e-mail (and any attachment(s)) is strictly confidential and for use only by intended recipient(s). Any use, distribution, reproduction or disclosure by any other person is strictly prohibited. The content of this e-mail does not constitute a commitment by the Company except where provided for in a written agreement between this e-mail addressee and the Company. If you are not an intended recipient(s), please notify the sender promptly and destroy this message and its attachments without reading or saving it in any manner. Any non authorized use of the content of this message constitutes a violation of the obligation to abstain from learning of the correspondence among other subjects, except for more serious offence, and exposes the person responsible to the relevant consequences.

A.

unread,
Jan 29, 2010, 9:58:31 AM1/29/10
to TurboGears
Thanks for that one Marco, works for me too!
Reply all
Reply to author
Forward
0 new messages