-i https://py.mdrn.pl/simple/
# django
-Django==2.2.27
+Django==2.2.28
fnpdjango==0.4.5
docutils==0.16
sorl-thumbnail==12.7.0
# home-brewed & dependencies
-librarian==2.3.5
+librarian==2.4
# celery tasks
celery[redis]==4.4.7
class BuildCoverClean(BuildCover):
@classmethod
def transform(cls, wldoc, fieldfile):
- from librarian.cover import WLCover
- return WLCover(wldoc.book_info, width=240).output_file()
+ if wldoc.book_info.cover_box_position == 'none':
+ from librarian.cover import WLCover
+ return WLCover(wldoc.book_info, width=240).output_file()
+ from librarian.covers.marquise import MarquiseCover
+ return MarquiseCover(wldoc.book_info, width=240).output_file()
@BuildEbook.register('cover_thumb')
<div class="c-support">
<div>
<h2>Ta książka jest dostępna dla tysięcy dzieciaków dzięki <span>darowiznom</span> od osób takich jak <span>Ty</span>!</h2>
- <a href="{% url 'club_join' %}">Dorzuć się!</a>
+ <a href="{% url 'club_join' %}?pk_campaign=layout">Dorzuć się!</a>
</div>
<figure>
<img src="{% static '2022/images/dziecko.jpeg' %}" alt="Dorzuć się!">
return True
def __init__(self, request):
- self.value = self.get_value(request)
+ self.value, self.manual = self.get_value(request)
def override(self, value):
self.value = value
+ self.manual = False
def get_value(self, request):
overrides = getattr(settings, 'EXPERIMENTS_OVERRIDES', {})
slug = self.slug
if slug in overrides:
- return overrides[slug]
+ return overrides[slug], False
if self.qualify(request) is False:
- return None
+ return None, False
cookie_value = request.COOKIES.get(f'EXPERIMENT_{slug}')
if cookie_value is not None:
if cookie_value == 'on':
- return True
+ return True, True
elif cookie_value == 'off':
- return False
+ return False, True
number = int(
hashlib.md5(
).hexdigest(),
16
) % 10e6 / 10e6
- return number < self.size
+ return number < self.size, False
<script type="text/javascript">
var _paq = window._paq || [];
{% for slug, experiment in request.EXPERIMENTS.items %}
- _paq.push(['setCustomVariable', '{{ forloop.counter }}', "{{ slug }}", "{{ experiment.value|yesno:"on,off," }}", "visit"]);
+ _paq.push(['setCustomVariable', '{{ forloop.counter }}', "{{ slug }}", "{{ experiment.value|yesno:"on,off," }}{{ experiment.manual|yesno:"-manual,," }}", "visit"]);
{% endfor %}
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);