Workaround for a @staticmethod/@classmethod bug
"R. Tyler Ballance" <[email protected]>
| Newsgroups | gmane.comp.python.cheetah |
|---|---|
| Message-ID | <[email protected]> |
We discovered thsi at Slide when we started using the #@staticmethod decorator in some of our code, it looks like I made a minor oversight when implementing and testing Cheetah's support for these decorators. The issue is that '_filter' is undefined inside these methods, the workaround is to place the following line at the *top* of your staticmethod function definition: #set _filter = lambda x, **kwargs: unicode(x) Issue tracked here: http://bugs.communitycheetah.org/view.php?id=21 Cheers -- -R. Tyler Ballance Slide, Inc. ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com _______________________________________________ Cheetahtemplate-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkoVuzwACgkQFCbH3D9R4W+qbQCghg335D9yLCb+3SMFl2w+897l y8QAoJyZLxHvYhYtAZhvA1pguGC8NvUU =HuQ1 -----END PGP SIGNATURE-----