On Monday, May 23, 2016 at 5:05:59 PM UTC-7, 黄祥 wrote:
>
> Does it work to import locale in the module instead of in the view?
>>
>
> import python module doesn't work in web2py modules, so it must redefine
> again (e.g. locale, datetime)
>
Importing datetime in a module called by a scheduler t
>
> Does it work to import locale in the module instead of in the view?
>
import python module doesn't work in web2py modules, so it must redefine
again (e.g. locale, datetime)
>
> Modules do not get the complete global environment from the model or
> controller that calls them
> (per reques
On Monday, May 23, 2016 at 3:01:14 PM UTC-7, 黄祥 wrote:
> *my conclusion :*
> - python locale module when used by scheduler must redefine it again in
> views
>
Does it work to import locale in the module instead of in the view?
Modules do not get the complete global environment from the model
in web2py book, i think we can put template using response.render in any
place in views.
*ref:*
http://web2py.com/books/default/chapter/29/08/emails-and-sms?search=response.render#Using-the-template-system-to-generate-messages
*the evidence fact i got :*
- mail() with response.render() that execu
On Saturday, May 21, 2016 at 12:08:14 PM UTC-7, Anthony wrote:
>
> Just to be clear, the traceback is from the view?
>
It looks like the error involves a* mail template* that happens to be in a
subdirectory of application/views.
I can't read the traceback elsethread, not knowing enough about
On Saturday, May 21, 2016 at 1:28:20 AM UTC-7, 黄祥 wrote:
>
> is scheduler can use python modules?
>
Certainly. In one of my scheduled tasks, I import os.path, datetime, sys,
pysftp, and time.
And this is done in a module. The "outer" procedure in the model imports
datetime, the module, and c
*full traceback got from table scheduler_run :*
Traceback (most recent call last):
File "/Users/MacBookPro/site/web2py/gluon/scheduler.py", line 313, in
executor
result = dumps(_function(*args, **vars))
File "applications/mutualfunds/models/scheduler.py", line 14, in
task_mail_investor_mo
Just to be clear, the traceback is from the view? Can you show the whole
traceback and the line that triggers it?
On Saturday, May 21, 2016 at 4:28:20 AM UTC-4, 黄祥 wrote:
>
> is scheduler can use python modules?
> e.g.
> *models/scheduler.py*
> def task_mail_investor_monthly_report():
> title = '
8 matches
Mail list logo