muffin_jade.py
def load_template(self, path):
        """ Load and compile a template. """
        if not path.startswith('/'):
            for folder in self.options['template_folders']:
                fullpath = op.join(folder, path)
                if op.exists(fullpath):
                    path = fullpath
                    break
            else:
                raise JadeException('Template doesnt exist: %s' % path)

        with open(path, 'rb') as f:
            source = f.read().decode(self.options['encoding'])

        return ExtendCompiler(
            pyjade.parser.Parser(source).parse(), pretty=self.options['pretty'],
            env=self, compileDebug=True
        )
 Load and compile a template. 
Load and compile a template.
Load and compile a template .
def load_template(self, path):
        if not path.startswith('/'):
            for folder in self.options['template_folders']:
                fullpath = op.join(folder, path)
                if op.exists(fullpath):
                    path = fullpath
                    break
            else:
                raise JadeException('Template doesnt exist: %s' % path)
        with open(path, 'rb') as f:
            source = f.read().decode(self.options['encoding'])
        return ExtendCompiler(
            pyjade.parser.Parser(source).parse(), pretty=self.options['pretty'],
            env=self, compileDebug=True
        )
def load_template ( self , path ) : if not path . startswith ( '/' ) : for folder in self . options [ 'template_folders' ] : fullpath = op . join ( folder , path ) if op . exists ( fullpath ) : path = fullpath break else : raise JadeException ( 'Template doesnt exist: %s' % path ) with open ( path , 'rb' ) as f : source = f . read ( ) . decode ( self . options [ 'encoding' ] ) return ExtendCompiler ( pyjade . parser . Parser ( source ) . parse ( ) , pretty = self . options [ 'pretty' ] , env = self , compileDebug = True )
Load and compile a template.
Load and compile a template .
""" Load and compile a template. """
self
path