7

Compare commits

...

2 Commits

Author SHA1 Message Date
4bbac1d542 Fix flake8 error in adapters.py 2018-10-30 10:11:19 +01:00
d9ef74c8f2 Prevent overriding media files as to load the page chooser
Fixes #194
2018-10-30 10:04:40 +01:00
4 changed files with 2 additions and 16 deletions

View File

@ -196,8 +196,7 @@ class SessionSegmentsAdapter(BaseSegmentsAdapter):
for segment in enabled_segments: for segment in enabled_segments:
if segment.is_static and segment.static_users.filter(id=self.request.user.id).exists(): if segment.is_static and segment.static_users.filter(id=self.request.user.id).exists():
additional_segments.append(segment) additional_segments.append(segment)
elif (segment.excluded_users.filter(id=self.request.user.id).exists() or elif (segment.excluded_users.filter(id=self.request.user.id).exists() or segment in excluded_segments):
segment in excluded_segments):
continue continue
elif not segment.is_static or not segment.is_full: elif not segment.is_static or not segment.is_full:
segment_rules = [] segment_rules = []

View File

@ -1,17 +1,6 @@
{% extends "modeladmin/index.html" %} {% extends "modeladmin/index.html" %}
{% load i18n l10n staticfiles modeladmin_tags %} {% load i18n l10n staticfiles modeladmin_tags %}
{% block titletag %}{{ view.get_meta_title }}{% endblock %}
{% block css %}
{{ block.super }}
{{ view.media.css }}
{% endblock %}
{% block extra_js %}
{{ view.media.js }}
{% endblock %}
{% block header %} {% block header %}
<header class="nice-padding hasform"> <header class="nice-padding hasform">
<div class="row"> <div class="row">

View File

@ -1,5 +1,5 @@
{% extends "modeladmin/wagtail_personalisation/segment/base.html" %} {% extends "modeladmin/wagtail_personalisation/segment/base.html" %}
{% load i18n l10n staticfiles modeladmin_tags wagtail_personalisation_filters %} {% load i18n l10n modeladmin_tags wagtail_personalisation_filters %}
{% block toggle_view %}to List {% endblock%} {% block toggle_view %}to List {% endblock%}

View File

@ -1,5 +1,3 @@
{% extends "modeladmin/wagtail_personalisation/segment/base.html" %} {% extends "modeladmin/wagtail_personalisation/segment/base.html" %}
{% load i18n l10n staticfiles modeladmin_tags wagtail_personalisation_filters %}
{% block toggle_view %}to Dashboard {% endblock%} {% block toggle_view %}to Dashboard {% endblock%}