I'm having the same problem. I have a general email template wich receives some context variables. I want to use that same template for sending the "verify_email", but can't figure it out. Any example? Thanks in advance.
El miércoles, 24 de abril de 2013 13:39:10 UTC-3, Cristoffer Fairweather escribió: > > First off, thanks to the community for a well written framework. The > documentation is very nice and full of examples. > > I thought I'd ask here, as I couldn't be the only want who didn't want a > text "verify email" to be sent out in lieu of nice, colorful, css heavy > html emails. > I want do the following to set an email template for > auth.messages.verify_email. > message = 'Click on the link https://' +request.env.http_host > +URL(r=request,c='default',f='user',args=['verify_email']) > + '/%(key)s to verify your email' > context = dict(message=message) > auth.messages.verify_email = > response.render('emailtemplates/standard_email.html', context) > > The problem is, because I have CSS in the template, I get the following > error. > <type 'exceptions.ValueError'> unsupported format character ';' (0x3b) at > index 316 > > Anyone else have this problem? I thought about modifying tool.py to use > self.messages.verify_email_context['key'] = key > message = > response.render(self.message.verify_email_template,self.messages.verify_email_context) > > #and put {{=key}} in the template > instead of > message=self.messages.verify_email % dict(key=key) > > > > > A similar question was asked here, but I didn't get any resolution from > the answer, as I'm having issues. > > https://groups.google.com/forum/?fromgroups=#!newtopic/web2py/web2py/WehiJB0HURM > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.