Re: Translation

2011-11-05 Thread Gael Pasgrimaud
To be clear, you need to use a translator. Else your TranslationString will act as a standard unicode string. get_localizer(request).translate(_('Client')) Pyramid use some magic to do that for you in chameleon templates. That's why it work in your html pages. On Sat, Nov 5, 2011 at 6:23 AM,

Celery Configuration with Pyramid

2011-11-05 Thread John Anderson
So I've been playing with celery configuration with Pyramid and I was wondering how you guys handle it? My problem right now is the best way to tell celery how to bind SQLAlchemy configuration. If I don't call initialize_sql inside my celeryconfig.py it doesn't get bound but I don't want to call

Re: Celery Configuration with Pyramid

2011-11-05 Thread Sontek
I ended up created a pyramid_celery app that has a paster command, that way I could load up the database the same way (through main) and then launch celeryd. https://github.com/sontek/pyramid_celery if anyone else needs it. So you define a celeryconfig.py like: CELERY_IMPORTS = (app.tasks, )

Re: pyramid.response.Response(app_iter=?)

2011-11-05 Thread jerry
Hi Gael, Indeed, app_iter does work flawlessly out-of-box with GridOut object. It was some other elementary mistake I made that is triggering the exception, my bad. Jerry On Nov 4, 12:04 am, Gael Pasgrimaud g...@gawel.org wrote: On Thu, Nov 3, 2011 at 4:54 PM, jerry jerryji1...@gmail.com

Re: Celery Configuration with Pyramid

2011-11-05 Thread jerry
Hi John, What's wrong with calling initialize_sql from Celery? I am calling initialize_sql(engine, create_all=False) in my Celery tasks.py and didn't notice any problem. Jerry On Nov 5, 8:05 pm, John Anderson son...@gmail.com wrote: So I've been playing with celery configuration with Pyramid

Possible? Raise HTTPNotFound within Exception handler view

2011-11-05 Thread Simon Yarde
Is it possible to raise an HTTPNotFound within an Exception handler view, and have the HTTPNotFound caught by a custom HTTPNotFound handler? Can anyone help? What I have... - An exception handler view which responds to a normal python Exception - works - I'm fielding the exception by either

Re: Celery Configuration with Pyramid

2011-11-05 Thread John Anderson
On Sat, Nov 5, 2011 at 9:28 AM, jerry jerryji1...@gmail.com wrote: Hi John, What's wrong with calling initialize_sql from Celery? I am calling initialize_sql(engine, create_all=False) in my Celery tasks.py and didn't notice any problem. celerytasks.py gets called when you first import

Re: Possible? Raise HTTPNotFound within Exception handler view

2011-11-05 Thread Michael Merickel
It is not possible to raise an exception within an exception view. -- Michael -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to