예제 #1
0
 def templatize(src, origin=None):
     src = to_text(src, settings.FILE_CHARSET)
     if origin.endswith(".pug"):
         html = process(src, compiler=Compiler)
     else:
         html = src
     return func(html, origin)
예제 #2
0
 def templatize(src, origin=None):
     src = to_text(src, settings.FILE_CHARSET)
     if origin.endswith(".jade"):
         html = process(src,compiler=Compiler)
     else:
         html = src
     return func(html, origin)
예제 #3
0
 def templatize(src, origin=None, charset=None):
     src = to_text(src, charset or settings.FILE_CHARSET)
     if origin.endswith(".pug"):
         html = process(src,
                        compiler=Compiler,
                        base_directory=os.path.basename(origin))
     else:
         html = src
     return func(html, origin)
예제 #4
0
    def templatize(src, origin=None):
        src = to_text(src, settings.FILE_CHARSET)

        loader = Loader((
            'django.template.loaders.filesystem.Loader',
            'django.template.loaders.app_directories.Loader',
        ))

        if loader.is_jade(origin):
            html = loader.process_jade(src, origin)
        else:
            html = src

        return func(html, origin)
예제 #5
0
파일: compiler.py 프로젝트: JelteF/pyjade
 def templatize(src, origin=None):
     src = to_text(src, settings.FILE_CHARSET)
     html = process(src,compiler=Compiler)
     return func(html, origin)
예제 #6
0
 def templatize(src, origin=None):
     src = to_text(src, settings.FILE_CHARSET)
     html = process(src, compiler=Compiler)
     return func(html, origin)