Sending email as a separate service

2013-03-16 Thread Vincent Catalano
I'm attempting to setup pyramid_mailer with a website I'm developing. The current documentation ( http://docs.pylonsproject.org/projects/pyramid_mailer/en/latest/) recommends creating a single instance of the Mailer and adding it to the configuration setup. However, I want to configure numerous job

Re: get data from tabel and send to view

2013-03-16 Thread Gert V
we added these lines in our views.py def get_items(request): return {request} @view_config(route_name='diagnose', xhr=True, renderer='json') def r_ajax(request): items = get_items(request) logger = logging.getLogger("random") logger.warning(json.dumps(items)) our ajax post lo

Re: get data from tabel and send to view

2013-03-16 Thread Gert V
We managed to set up a ajax request with our data inside. We get the succes message, but we don't know how to get the json out of our ajax request. We added these lines in our views.py def get_items(request): return {request} @view_config(route_name=' diagnose', xhr=True, renderer='json')

Pyramid modular app includer setup

2013-03-16 Thread Anthony Perot
I have implemented a global appIncluder function which is imported as includeme with the *init*.py of the package to be included. includeme (appIncluder) receives the config object, so it is then easy to use config.package and its variables/methods/classes (present in the same * init*.py and s

Re: get data from tabel and send to view

2013-03-16 Thread Malthe Borch
This is related to jQuery, not the Python framework that you're using. Note that the `success` function receives more arguments than just the message. \malthe On 16 March 2013 17:09, Gert V wrote: > We managed to set up a ajax request with our data inside. > We get the succes message, but we do

Re: Pyramid modular app includer setup

2013-03-16 Thread Anthony Perot
However, a question: Where should I register, when includeme is called, the app in something like registred_apps. Should I just do config.registry.setdefault('registered_apps', []) in the main __init__.py and then append to it from my appIncluder function ? Please advise. On Sunday, 17 March 20

Re: Pyramid modular app includer setup

2013-03-16 Thread Anthony Perot
However, a question: Where should I register, when includeme is called, the app in something like registred_apps. Should I just do config.registry.setdefault('registered_apps', []) in the main __init__.py and then append to it from my appIncluder function ? Please advise. -- You received this

Re: Sending email as a separate service

2013-03-16 Thread Eric Rasmussen
I may be misunderstanding the question because I am not too familiar with APScheduler, but it sounds like you want to use mailer.send_to_queue(message) instead of mailer.send(message). As long as you're sending it to the queue for later processing there shouldn't be any need to have multiple Maile