7

Add the logic for static segments

This commit is contained in:
Todd Dembrey
2017-10-17 16:57:07 +01:00
parent 0d9e4aab0c
commit 675d219f1f
5 changed files with 200 additions and 8 deletions

View File

@ -18,6 +18,7 @@ from wagtail.wagtailadmin.edit_handlers import (
class AbstractBaseRule(models.Model):
"""Base for creating rules to segment users with."""
icon = 'fa-circle-o'
static = False
segment = ParentalKey(
'wagtail_personalisation.Segment',
@ -190,6 +191,7 @@ class VisitCountRule(AbstractBaseRule):
"""
icon = 'fa-calculator'
static = True
OPERATOR_CHOICES = (
('more_than', _("More than")),