コード例 #1
0
def do_static_build(parser, token):

    file_name = token.split_contents()[1][1:-1]
    with open(os.path.join(HOME, 'assets.json')) as data_file:
        import json as json_lib
        file_name = json_lib.load(data_file)[file_name]
    contents = 'static \'' + 'build/' + file_name + '\''
    new_token = Token(token_type=token.token_type, contents=contents)

    return StaticFilesNode.handle_token(parser, new_token)
コード例 #2
0
 def do_static(parser, token):
     return StaticFilesNode.handle_token(parser, token)
コード例 #3
0
ファイル: api.py プロジェクト: tramora/taiga-back-epic2task
def do_static(parser, token):
    return StaticFilesNode.handle_token(parser, token)