Merge pull request #1390 from alphagov/rc-monthly-template-usage-endpoint

Added new endpoint to get the new template stats
This commit is contained in:
Richard Chapman
2017-11-15 16:20:04 +00:00
committed by GitHub
9 changed files with 602 additions and 39 deletions

View File

@@ -1612,3 +1612,11 @@ class StatsTemplateUsageByMonth(db.Model):
nullable=False,
default=0
)
def serialize(self):
return {
'template_id': str(self.template_id),
'month': self.month,
'year': self.year,
'count': self.count
}