fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix imports.
[wolnelektury.git]
/
src
/
stats
/
models.py
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
import re
+from urllib.request import urlopen
+from django.apps import apps
from django.conf import settings
from django.db import models
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):
@classmethod
def build_month(cls, year, month):
+ Book = apps.get_model('catalogue', 'Book')
### TODO: Delete existing?
date = f'{year}-{month:02d}'
### TODO: Delete existing?
date = f'{year}-{month:02d}'