当前位置: 首页>>代码示例>>Python>>正文


Python Environment.versions方法代码示例

本文整理汇总了Python中flask_assets.Environment.versions方法的典型用法代码示例。如果您正苦于以下问题:Python Environment.versions方法的具体用法?Python Environment.versions怎么用?Python Environment.versions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在flask_assets.Environment的用法示例。


在下文中一共展示了Environment.versions方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Bundle

# 需要导入模块: from flask_assets import Environment [as 别名]
# 或者: from flask_assets.Environment import versions [as 别名]
            'vendor/js/esri-leaflet.js'
        ),
        Bundle(
            'portal_ui/js/generalMapping.js',
            'portal_ui/js/providerSitesMap.js',
            'portal_ui/js/providerSitesMapOnReady.js'
        ),
        filters='jsmin',
        output='gen/sitesMap.js'),
    'site_map': Bundle(
        Bundle(
            'vendor/js/leaflet.js',
            'vendor/js/leaflet-providers.js',
            'vendor/js/leaflet.markercluster.js',
            'vendor/js/esri-leaflet.js'
        ),
        Bundle(
            'portal_ui/js/generalMapping.js',
            'portal_ui/js/providerSiteMap.js',
            'portal_ui/js/nldiMapping.js',
            'portal_ui/js/providerSiteMapOnReady.js'
        ),
        filters='jsmin',
        output='gen/siteMap.js')
}
    
assets = Environment(app)
assets.versions = 'hash'
assets.register(bundles)

开发者ID:jkreft-usgs,项目名称:WQP_UI,代码行数:31,代码来源:assets.py

示例2: SQLAlchemy

# 需要导入模块: from flask_assets import Environment [as 别名]
# 或者: from flask_assets.Environment import versions [as 别名]
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.register_blueprint(API)
db = SQLAlchemy(app)
app.config.from_pyfile('apihoyodecrimen.cfg')


# report exceptions to sentry.io
# first test if sentry.io is in the string
# to see if we are in the testing environment
if 'sentry.io' in os.environ['SENTRY_DSN']:
    sentry = Sentry(dsn= os.environ['SENTRY_DSN'])
    sentry.init_app(app)

cache.init_app(app)
assets = Environment(app)
assets.versions = 'hash'    # use the last modified timestamp
babel = Babel(app)


#freezer = Freezer(app)
#app.config['FREEZER_STATIC_IGNORE'] = ['/api/v1/*']

def uglify(route_function):
    @functools.wraps(route_function)
    def wrapped(*args, **kwargs):
        yielded_html = route_function(*args, **kwargs)
        minified_html = minify(yielded_html)
        return minified_html

    return wrapped
开发者ID:diegovalle,项目名称:hoyodecrimen.api,代码行数:32,代码来源:hoyodecrimen.py

示例3: Flask

# 需要导入模块: from flask_assets import Environment [as 别名]
# 或者: from flask_assets.Environment import versions [as 别名]
        elif current_line is not None:
            current_line += line
    log.reverse()
    return log


# Create web server and load settings
app = Flask(__name__, static_url_path='')
app.config.from_object('default_settings')
app.config.from_pyfile('settings.cfg', silent=True)


# Assets plugin creates optimized javascript and css files
# to improve page load a bit
assets = Environment(app)
assets.versions = 'timestamp'


# Optimize Main javascript files
js_assets = Bundle(
    'vendor/js/jquery.js',
    'vendor/js/jquery.flot.js',
    'vendor/js/jquery.flot.axislabels.js',
    'vendor/js/jquery.flot.time.js',
    'vendor/js/jquery.flot.tooltip.js',
    'vendor/js/jquery.flot.downsample.js',
    'vendor/js/select2.js',
    'vendor/js/bootstrap-button.js',
    'vendor/js/bootstrap-datepicker.js',
    filters='rjsmin',
    output='js/min.js')
开发者ID:UAA-EQLNES,项目名称:ARTF-Data-Receiver,代码行数:33,代码来源:server.py


注:本文中的flask_assets.Environment.versions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。