Пример #1
0
 def create_app(self):
     return create_app(True)
Пример #2
0
#!/usr/bin/env python
import os
import re
from subprocess import call

from flask.ext.script import Manager, Command

from ocfnet import create_app

app = create_app()

manager = Manager(app)

@manager.command
def build_js():
    call([
        'node',
        'node_modules/webpack/bin/webpack.js',
        './webpack.config.js'
    ])

@manager.command
def build_external_css():
    """Configures and builds external CSS libraries"""
    
    # Symbolically link bootstrap font files
    extensions = ['eot', 'svg', 'ttf', 'woff', 'woff2']
    if not os.path.exists('ocfnet/static/fonts/bootstrap'):
        os.makedirs('ocfnet/static/fonts/bootstrap')
    root = os.path.dirname(os.path.abspath(__file__))
    filename = 'glyphicons-halflings-regular'