I'm trying to write a batch script, which is scheduled to run every evening, and it will send out email to users who meet a certain criteria. The user's language preference is stored in the db, so the message being sent to users will have translation string. There are two ways of doing is in my mind:
1. Write a dummy view callable to wrap the email sending logic, use bootstrap to get the env, then simulate a request to call the view callable. In this way I can use the global i18n setting which has been done in the application startup, for example: pyramid.config.Configurator.add_translation_dirs() 2. The whole logic is in the console script, but I have to setup the i18n env manually. Am I doing right or there is better way to implement this? -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
