Skip to content

Prevent overriding media files as to load the page chooser #195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/wagtail_personalisation/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@ def refresh(self):
for segment in enabled_segments:
if segment.is_static and segment.static_users.filter(id=self.request.user.id).exists():
additional_segments.append(segment)
elif (segment.excluded_users.filter(id=self.request.user.id).exists() or
segment in excluded_segments):
elif (segment.excluded_users.filter(id=self.request.user.id).exists() or segment in excluded_segments):
continue
elif not segment.is_static or not segment.is_full:
segment_rules = []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
{% extends "modeladmin/index.html" %}
{% 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 %}
<header class="nice-padding hasform">
<div class="row">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% 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%}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{% extends "modeladmin/wagtail_personalisation/segment/base.html" %}
{% load i18n l10n staticfiles modeladmin_tags wagtail_personalisation_filters %}

{% block toggle_view %}to Dashboard {% endblock%}