fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Work list: don't care about types of objects on other pages.
[wolnelektury.git]
/
wolnelektury
/
utils.py
diff --git
a/wolnelektury/utils.py
b/wolnelektury/utils.py
index
ad57222
..
e06fb1d
100644
(file)
--- a/
wolnelektury/utils.py
+++ b/
wolnelektury/utils.py
@@
-1,11
+1,22
@@
+# -*- coding: utf-8 -*-
+# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+#
import pytz
from django.utils import timezone
from django.conf import settings
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)
def localtime_to_utc(localtime):
return timezone.utc.normalize(
def localtime_to_utc(localtime):
return timezone.utc.normalize(
-
pytz.timezone(settings.TIME_ZONE)
.localize(localtime)
+
tz
.localize(localtime)
)
def utc_for_js(dt):
return dt.strftime('%Y/%m/%d %H:%M:%S UTC')
)
def utc_for_js(dt):
return dt.strftime('%Y/%m/%d %H:%M:%S UTC')
+
+class GzipPipelineCachedStorage(GZIPMixin, PipelineCachedStorage):
+ pass