Armin, Reversing the two lines fixed the problem. Thanks.
I'm open to better ideas. Basically, I have a BaseReport class from which all XXXReport classes derive. My thought was to put in custom template filters into BaseReport. If custom filters should be global, I can live with that. [note: This is using jinja2 for stand-alone reports, not with Flask.] Thanks again for your response. Jeff Bauer Rubicon, Inc. On Sep 20, 8:04 am, Armin Ronacher <[email protected]> wrote: > Hi, > > On 9/17/10 3:03 PM, Jeff Bauer wrote:> self.template = > env.get_template(template_file) > > env.filters['timestampformat'] = timestampformat > > Reverse these two lines in any case. Modifying the environment after > templates are loaded is undefined behaviour. It might work, but it > probably will not. > > I don't know why that should be failing, but in general it does not > sound like the best idea to have one environment per class. > > Regards, > Armin -- You received this message because you are subscribed to the Google Groups "pocoo-libs" 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/pocoo-libs?hl=en.
