diff --git a/nyaa/__init__.py b/nyaa/__init__.py
index f2d33fc..e743c6f 100644
--- a/nyaa/__init__.py
+++ b/nyaa/__init__.py
@@ -81,6 +81,12 @@ def create_app(config):
# Assets
assets.init_app(app)
+ assets._named_bundles = {} # Hack to fix state carrying over in tests
+ main_js = Bundle('js/main.js', filters='rjsmin', output='js/main.min.js')
+ bs_js = Bundle('js/bootstrap-select.js', filters='rjsmin',
+ output='js/bootstrap-select.min.js')
+ assets.register('main_js', main_js)
+ assets.register('bs_js', bs_js)
# css = Bundle('style.scss', filters='libsass',
# output='style.css', depends='**/*.scss')
# assets.register('style_all', css)
diff --git a/nyaa/templates/layout.html b/nyaa/templates/layout.html
index 5ad403e..325f796 100644
--- a/nyaa/templates/layout.html
+++ b/nyaa/templates/layout.html
@@ -45,8 +45,12 @@
-
-
+ {% assets "bs_js" %}
+
+ {% endassets %}
+ {% assets "main_js" %}
+
+ {% endassets %}