'Plugins templates are validated at this stage'

def validate_templates(self, plugin=None):

    if plugin:
        plugins = [plugin]
    else:
        plugins = self.plugins.values()
    for plugin in plugins:
        if ((plugin.render_plugin and (not (type(plugin.render_plugin) == property))) or hasattr(plugin.model, 'render_template') or hasattr(plugin, 'get_render_template')):
            if ((plugin.render_template is None) and (not hasattr(plugin, 'get_render_template'))):
                raise ImproperlyConfigured(('CMS    Plugins    must    define    a    render    template,    a    get_render_template    method    or    set    render_plugin=False:    %s' % plugin))
            elif (not hasattr(plugin, 'get_render_template')):
                from django.template import loader
                template = plugin.render_template
                if (isinstance(template, six.string_types) and template):
                    try:
                        loader.get_template(template)
                    except TemplateDoesNotExist as e:
                        if (six.text_type(e) == template):
                            raise ImproperlyConfigured(('CMS    Plugins    must    define    a    render    template    (%s)    that    exists:    %s' % (plugin, template)))
                        else:
                            pass
                    except TemplateSyntaxError:
                        pass
        elif plugin.allow_children:
            raise ImproperlyConfigured(('CMS    Plugins    can    not    define    render_plugin=False    and    allow_children=True:    %s' % plugin))
