Ebooks are now named after the book's slug and overwrite old versions.
[wolnelektury.git] / wolnelektury / utils.py
index 0c256e5..e06fb1d 100644 (file)
@@ -5,6 +5,8 @@
 import pytz
 from django.utils import timezone
 from django.conf import settings
+from pipeline.storage import GZIPMixin
+from pipeline.storage import PipelineCachedStorage
 
 tz = pytz.timezone(settings.TIME_ZONE)
 
@@ -15,3 +17,6 @@ def localtime_to_utc(localtime):
 
 def utc_for_js(dt):
     return dt.strftime('%Y/%m/%d %H:%M:%S UTC')
+
+class GzipPipelineCachedStorage(GZIPMixin, PipelineCachedStorage):
+    pass