Commits

Audrius Kažukauskas committed 2fbc10b

Use Flask-Assets and webassets from git

  • Participants
  • Parent commits 8f92342

Comments (0)

Files changed (3)

File beancounter/__init__.py

 
 from flask import Flask
 from flask.ext.assets import Environment
-from webassets.loaders import YAMLLoader
 
 from beancounter.model import db_session, init_engine
 from beancounter.views.entries import entries
     # Disable asset rebuilding in production mode.
     if not app.debug:
         assets.auto_build = False
-    bundles = YAMLLoader(assets_filename).load_bundles()
-    assets.register('js-all', bundles['js-all'])
-    assets.register('css-all', bundles['css-all'])
+    assets.from_yaml(assets_filename)
 
     return app
 

File beancounter/model.py

 
 def init_engine(db_uri):
     global db_engine
-    db_engine = create_engine(db_uri, convert_unicode=True, echo=False)
+    db_engine = create_engine(db_uri)
     if db_engine.name == 'sqlite':
         event.listen(db_engine, 'connect', _fk_pragma_on_connect)
 

File requirements.txt

 Flask
-Flask-Assets
+-e git://github.com/miracle2k/webassets.git#egg=webassets
+-e git://github.com/miracle2k/flask-assets.git#egg=Flask-Assets
 Flask-Script
 SQLAlchemy
 cssmin