fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01fd09f
)
Fix imports.
author
Radek Czajka
<rczajka@rczajka.pl>
Mon, 31 May 2021 13:40:52 +0000
(15:40 +0200)
committer
Radek Czajka
<rczajka@rczajka.pl>
Mon, 31 May 2021 13:40:52 +0000
(15:40 +0200)
src/stats/models.py
patch
|
blob
|
history
diff --git
a/src/stats/models.py
b/src/stats/models.py
index
ea1a790
..
0bd391a
100644
(file)
--- 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}'