7

now adds segments of a user to the session

This commit is contained in:
Boris Besemer
2016-11-07 15:42:03 +01:00
parent e7accad575
commit eac54cda50
3 changed files with 42 additions and 7 deletions

View File

@ -17,6 +17,12 @@ Model for a new segment
@python_2_unicode_compatible
class Segment(ClusterableModel):
name = models.CharField(max_length=255)
STATUS_CHOICES = (
('disabled', 'Disabled'),
('live', 'Live'),
('completed', 'Completed'),
)
status = models.CharField(max_length=20, choices=STATUS_CHOICES, default="disabled")
panels = [
FieldPanel('name'),
@ -25,6 +31,10 @@ class Segment(ClusterableModel):
def __str__(self):
return self.name
def encoded_name(self):
return "".join(self.name.lower().split())
"""
Base for creating rules to segment users with