From d7a529dd9455847ccdfcf52d91787e9a87473aca Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sun, 26 Apr 2020 03:39:38 +0000 Subject: [PATCH] Rename table to StatsSignupCount --- apiserver/apiserver/api/models.py | 2 +- apiserver/import_signup_counts.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apiserver/apiserver/api/models.py b/apiserver/apiserver/api/models.py index b472930..2f3216a 100644 --- a/apiserver/apiserver/api/models.py +++ b/apiserver/apiserver/api/models.py @@ -133,7 +133,7 @@ class StatsMemberCount(models.Model): member_count = models.IntegerField() green_count = models.IntegerField() -class StatsMemberSignup(models.Model): +class StatsSignupCount(models.Model): month = models.DateField() signup_count = models.IntegerField() diff --git a/apiserver/import_signup_counts.py b/apiserver/import_signup_counts.py index f2681fe..91727c3 100755 --- a/apiserver/import_signup_counts.py +++ b/apiserver/import_signup_counts.py @@ -14,7 +14,7 @@ with open('old_counts.csv', newline='') as csvfile: for row in reader: print('Adding', row['month'], row['signup_count']) - models.StatsMemberSignup.objects.update_or_create( + models.StatsSignupCount.objects.update_or_create( month=row['month']+'-01', defaults=dict(signup_count=row['signup_count']), )