From: Radek Czajka Date: Mon, 31 May 2021 13:40:52 +0000 (+0200) Subject: Fix imports. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/8a9843b112f8a3f72603afc9fb5d15ddcbd77559 Fix imports. --- 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}'