From 8a9843b112f8a3f72603afc9fb5d15ddcbd77559 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 31 May 2021 15:40:52 +0200 Subject: [PATCH] Fix imports. --- src/stats/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/stats/models.py b/src/stats/models.py index ea1a79042..0bd391a55 100644 --- a/src/stats/models.py +++ b/src/stats/models.py @@ -1,4 +1,6 @@ import re +from urllib.request import urlopen +from django.apps import apps from django.conf import settings from django.db import models @@ -12,6 +14,7 @@ class Visits(models.Model): @classmethod def build_month(cls, year, month): + Book = apps.get_model('catalogue', 'Book') ### TODO: Delete existing? date = f'{year}-{month:02d}' -- 2.20.1