fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
79f48dd
)
fixes
master
author
Radek Czajka
<rczajka@rczajka.pl>
Mon, 22 Dec 2025 10:18:16 +0000
(11:18 +0100)
committer
Radek Czajka
<rczajka@rczajka.pl>
Mon, 22 Dec 2025 10:18:16 +0000
(11:18 +0100)
src/api/views.py
patch
|
blob
|
history
src/bookmarks/models.py
patch
|
blob
|
history
src/bookmarks/views.py
patch
|
blob
|
history
src/catalogue/api/tojson.py
patch
|
blob
|
history
src/catalogue/views.py
patch
|
blob
|
history
src/lesmianator/models.py
patch
|
blob
|
history
diff --git
a/src/api/views.py
b/src/api/views.py
index
aa03f46
..
5d52678
100644
(file)
--- a/
src/api/views.py
+++ b/
src/api/views.py
@@
-286,7
+286,9
@@
class RegisterView(GenericAPIView):
if settings.FEATURE_CONFIRM_USER:
UserConfirmation.request(user)
if settings.FEATURE_CONFIRM_USER:
UserConfirmation.request(user)
- return Response({})
+ return Response({
+ 'emailConfirmationRequired': settings.FEATURE_CONFIRM_USER,
+ })
class RefreshTokenView(APIView):
class RefreshTokenView(APIView):
diff --git
a/src/bookmarks/models.py
b/src/bookmarks/models.py
index
7325e2d
..
098a8b0
100644
(file)
--- a/
src/bookmarks/models.py
+++ b/
src/bookmarks/models.py
@@
-40,7
+40,7
@@
class Bookmark(Syncable, models.Model):
self.audio_timestamp = self.book.sync_elid(self.anchor)
if self.audio_timestamp:
self.mode = 'audio'
self.audio_timestamp = self.book.sync_elid(self.anchor)
if self.audio_timestamp:
self.mode = 'audio'
- self.anchor = self.book.sync_ts(self.audio_timestamp)
+ self.anchor = self.book.sync_ts(self.audio_timestamp)
or ''
return super().save(*args, **kwargs)
@classmethod
return super().save(*args, **kwargs)
@classmethod
diff --git
a/src/bookmarks/views.py
b/src/bookmarks/views.py
index
0ff5104
..
50390df
100644
(file)
--- a/
src/bookmarks/views.py
+++ b/
src/bookmarks/views.py
@@
-62,6
+62,8
@@
def bookmark_delete(request, uuid):
@cache.never_cache
def quotes(request):
@cache.never_cache
def quotes(request):
+ if not request.user.is_authenticated:
+ return JsonResponse({})
try:
slug = request.headers['Referer'].rsplit('.', 1)[0].rsplit('/', 1)[-1]
except:
try:
slug = request.headers['Referer'].rsplit('.', 1)[0].rsplit('/', 1)[-1]
except:
diff --git
a/src/catalogue/api/tojson.py
b/src/catalogue/api/tojson.py
index
3d47cd9
..
3ff257a
100644
(file)
--- a/
src/catalogue/api/tojson.py
+++ b/
src/catalogue/api/tojson.py
@@
-89,6
+89,11
@@
tags = {
'pr': ('a', True, {'class': 'footnote footnote-pr'}, None, False),
'pt': ('a', True, {'class': 'footnote footnote-pt'}, None, False),
'ptrad': ('a', True, {'class': 'footnote footnote-ptrad'}, None, False),
'pr': ('a', True, {'class': 'footnote footnote-pr'}, None, False),
'pt': ('a', True, {'class': 'footnote footnote-pt'}, None, False),
'ptrad': ('a', True, {'class': 'footnote footnote-ptrad'}, None, False),
+
+ 'werset': ('p', True, {'class': 'werset'}, None, True),
+ 'br': ('br', False, None, None, None),
+ 'indeks_dolny': ('em', True, {'class': 'indeks_dolny'}, None, False),
+ 'mat': ('span', True, {'class': 'mat'}, None, False),
}
id_prefixes = {
}
id_prefixes = {
diff --git
a/src/catalogue/views.py
b/src/catalogue/views.py
index
1ac6c08
..
e754e05
100644
(file)
--- a/
src/catalogue/views.py
+++ b/
src/catalogue/views.py
@@
-214,6
+214,8
@@
class TaggedObjectList(BookList):
super().analyse()
self.ctx['tags'] = analyse_tags(self.request, self.kwargs['tags'])
super().analyse()
self.ctx['tags'] = analyse_tags(self.request, self.kwargs['tags'])
+ if len(self.ctx['tags']) > 4:
+ raise Http404
self.ctx.update({
'fragment_tags': [],
'work_tags': [],
self.ctx.update({
'fragment_tags': [],
'work_tags': [],
diff --git
a/src/lesmianator/models.py
b/src/lesmianator/models.py
index
bcf271c
..
e32dd04
100644
(file)
--- a/
src/lesmianator/models.py
+++ b/
src/lesmianator/models.py
@@
-140,7
+140,8
@@
class Continuations(models.Model):
@classmethod
def for_userlist(cls, ul):
@classmethod
def for_userlist(cls, ul):
- cont_tabs = (cls.get(b) for b in ul.get_books())
+ cont_tabs = [cls.get(b) for b in ul.get_books()]
+ if not cont_tabs: return {}
return reduce(cls.join_conts, cont_tabs)
@classmethod
return reduce(cls.join_conts, cont_tabs)
@classmethod