Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Let projects specify css media default in settings

  • Loading branch information...
commit 1a8be028582538bc77c59fa5523d024677de49c2 1 parent 5eb7f73
@gkoberger gkoberger authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 jingo_minify/helpers.py
View
5 jingo_minify/helpers.py
@@ -52,11 +52,14 @@ def js(bundle, debug=settings.TEMPLATE_DEBUG, defer=False, async=False):
@register.function
-def css(bundle, media="screen,projection,tv", debug=settings.TEMPLATE_DEBUG):
+def css(bundle, media=False, debug=settings.TEMPLATE_DEBUG):
"""
If we are in debug mode, just output a single script tag for each css file.
If we are not in debug mode, return a script that points at bundle-min.css.
"""
+ if not media:
+ media = getattr(settings, 'CSS_MEDIA_DEFAULT', "screen,projection,tv")
+
if debug:
items = []
for item in settings.MINIFY_BUNDLES['css'][bundle]:
Please sign in to comment.
Something went wrong with that request. Please try again.