This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Handlebars.registerHelper('trans', function(fn) { | |
return gettext(fn(this)); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os.path | |
from django.core.files.storage import FileSystemStorage | |
from django.core.files.base import ContentFile | |
from slimit import minify | |
class StaticFileStorageAndJSMinifier(FileSystemStorage): | |
""" | |
A storage backend to be used by the staticfiles app -- STATICFILES_STORAGE | |
setting. This backend operates just as a normal filesystem storage backend | |
except when it detects a javascript file. |