--
You received this message because you are subscribed to the Google Groups "py4web" group.
To unsubscribe from this group and stop receiving emails from it, send an email to py4web+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/py4web/b78ccf9a-4f16-4ae9-9d81-1ff387ef1b42n%40googlegroups.com.
Thank you, Massimo. I’m not able to find auth.mailer.send. Did you perhaps mean auth.sender.send?
It looks to me like the key change is to check whether body is a 2-element list or tuple and, if so, apply format(**d) to both elements. I was able to get it working by simply updating this line as follows:
Please let me know if any additional information is needed.
Thank you!
Hadi
To view this discussion visit https://groups.google.com/d/msgid/py4web/b97ef0a2-5c7c-4646-b83f-2bdad65498b5n%40googlegroups.com.
I’ve realized that my previous test was invalid because I hadn’t restarted py4web after making the update.
Further testing indicates that there are two issues with the current implementation:
The output on this line is of type map, but later on we check for the types tuple and list.
The send method in the Mailer library expects a string, but we are passing lazyT objects.
The following change to this section of auth.py resolves both issues. However, I’m not sure whether this is the best approach, or whether it might introduce unintended side effects elsewhere in the system that I’m not aware of.
===>
Thank you!
Hadi
To view this discussion visit https://groups.google.com/d/msgid/py4web/d7836c98-290a-4123-a097-a3793a8ba1can%40googlegroups.com.
I’ll test it shortly, but I have three quick questions for now:
Can to_unicode() accept a list as input? This question is prompted by this line.
The method description suggests that the HTML portion of the body list can be provided as a file, but I don’t see which part of the code handles this.
Should we turn this "if" into an "elif"? It seems to me that there is no advantage in checking anything else if text is None.