7

Further simplifications.

This commit is contained in:
Bertrand Bordage
2017-05-31 17:38:51 +02:00
parent 4f2dc3a304
commit f88722c827
5 changed files with 15 additions and 32 deletions

View File

@ -88,6 +88,13 @@ class Segment(ClusterableModel):
rule_model._default_manager.filter(segment=self))
return segment_rules
def toggle(self, save=True):
self.status = (
self.STATUS_ENABLED if self.status == self.STATUS_DISABLED
else self.STATUS_DISABLED)
if save:
self.save()
class PersonalisablePageMixin(models.Model):
"""The personalisable page model. Allows creation of variants with linked