Back to index

plone3  3.1.7
Functions
plone.app.form._patches Namespace Reference

Functions

def apply_patches

Function Documentation

Definition at line 4 of file _patches.py.

00004 
00005 def apply_patches():
00006 
00007     # Five's base class defines template as a ViewPageTemplateFile.
00008     # However, the base 'zope.formlib.form.FormBase' has 'template'
00009     # defined as a NamedTemplate, which is much nicer, and what we
00010     # want.
00011     if 'template' in formbase.FiveFormlibMixin.__dict__:
00012         logger = logging.getLogger('plone.app.form')
00013         logger.debug('*** MONKEYPATCH *** : delete "template" attribute of ' +
00014            'FiveFormlibMixin to allow use of named templates.')
00015         delattr(formbase.FiveFormlibMixin, 'template')