Begin implementing Drilldown functionality

This commit is contained in:
2022-07-21 13:46:48 +01:00
parent e047a986e9
commit e866277f52
10 changed files with 57 additions and 28 deletions

View File

@@ -25,5 +25,7 @@ class User(AbstractUser):
plans = models.ManyToManyField(Plan, blank=True)
def has_plan(self, plan):
if not self.paid: # We can't have any plans if we haven't paid
return False
plan_list = [plan.name for plan in self.plans.all()]
return plan in plan_list