Example #1
0
 def _init_theme_plugin(self):
     if 'theme' in self.config:
         self.theme_name = self.config['theme'].get('id', '')
         tp = plugin.load_theme_plugin(self.name, self.theme_name)
         if tp:
             self.theme_plugin = tp(self)
     else:
         self.theme_name = None
Example #2
0
 def _init_theme_plugin(self):
     if 'theme' in self.config:
         self.theme_name = self.config['theme'].get('id', '')
         tp = plugin.load_theme_plugin(self.name, self.theme_name)
         if tp:
             self.theme_plugin = tp(self)
     else:
         self.theme_name = None
Example #3
0
    def _init_theme_plugin(self):
        """
        Checks for custom theme's plugin. If no custom plugin if found,
        it will load the mpdf default one
        """

        default_theme_plugin = plugin.MPDFPlugin

        if 'theme' in self.config:
            self.theme_name = self.config['theme'].get('id', '')
            tp = plugin.load_theme_plugin(self.name, self.theme_name)

            self.theme_plugin = tp(self) if tp else default_theme_plugin(self)
Example #4
0
    def _init_theme_plugin(self):
        """
        Checks for custom theme's plugin. If no custom plugin if found,
        it will load the mpdf default one
        """

        default_theme_plugin = plugin.MPDFPlugin

        if 'theme' in self.config:
            self.theme_name = self.config['theme'].get('id', '')
            tp = plugin.load_theme_plugin(self.name, self.theme_name)

            self.theme_plugin = tp(self) if tp else default_theme_plugin(self)
Example #5
0
 def _get_theme_plugin(self):
     return plugin.load_theme_plugin(self._theme_suffix, self.theme_name)
Example #6
0
 def _get_theme_plugin(self):
     return plugin.load_theme_plugin(self._theme_suffix, self.theme_name)
Example #7
0
 def _get_theme_plugin(self):
     return plugin.load_theme_plugin(self.name, self.theme_name)
Example #8
0
    def _get_theme_plugin(self):
        """Return theme plugin

           Theme plugin loads using "epub" key, because we repeat epub convertion.
        """
        return plugin.load_theme_plugin('epub', self.theme_name)