From: Radek Czajka
@@ -84,7 +90,7 @@
- {% url "api_fragment" "sen-nocy-letniej" "1290526312912-3814598192" as f %} + {% url "catalogue_api_fragment" "sen-nocy-letniej" "1290526312912-3814598192" as f %} {% blocktrans with "/api/authors/william-shakespeare/themes/zabawa/fragments/" as e %} The same way, using also books and themes, you can search for a list of fragments: {{e}}. diff --git a/src/api/templates/oauth/authorize_token.html b/src/api/templates/oauth/authorize_token.html index e54f70136..49dd098ea 100644 --- a/src/api/templates/oauth/authorize_token.html +++ b/src/api/templates/oauth/authorize_token.html @@ -1,6 +1,12 @@ -{% extends "base/base.html" %} +{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %} {% load i18n %} +{% block settings %} + {% load title %} + {% trans "Authorize access to Wolne Lektury" as title %} + {% title title %} +{% endblock %} + {% block titleextra %}{% trans "Authorize access to Wolne Lektury" %}{% endblock %} {% block body %} diff --git a/src/api/views.py b/src/api/views.py index 6762fb1da..be1491b6f 100644 --- a/src/api/views.py +++ b/src/api/views.py @@ -75,7 +75,7 @@ def oauth_user_auth(request): realms, credentials = endpoint.get_realms_and_credentials( **oauthlib_request(request)) except OAuth1Error as e: - return HttpResponse(e.message, status=400) + return HttpResponse(str(e), status=400) callback = request.GET.get('oauth_callback') form = OAuthAuthenticationForm(initial={ diff --git a/src/catalogue/api/views.py b/src/catalogue/api/views.py index b45ad4656..5512501c6 100644 --- a/src/catalogue/api/views.py +++ b/src/catalogue/api/views.py @@ -320,7 +320,7 @@ class TagView(RetrieveAPIView): slug=self.kwargs['slug'] ) except Http404: - if self.method == 'PUT': + if self.request.method == 'PUT': return Tag( category=self.kwargs['category'], slug=self.kwargs['slug'] diff --git a/src/dictionary/templates/dictionary/note_list.html b/src/dictionary/templates/dictionary/note_list.html index 3a19b4ec8..6c1da2ec1 100644 --- a/src/dictionary/templates/dictionary/note_list.html +++ b/src/dictionary/templates/dictionary/note_list.html @@ -1,7 +1,12 @@ -{% extends "base/base.html" %} +{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %} {% load i18n pagination_tags %} {% load set_get from set_get %} +{% block settings %} + {% load title %} + {% trans "Footnotes" as title %} + {% title title %} +{% endblock %} {% block bodyid %}footnotes{% endblock %} diff --git a/src/infopages/templates/infopages/2022/infopage.html b/src/infopages/templates/infopages/2022/infopage.html index 9c14723e5..465ad88cc 100644 --- a/src/infopages/templates/infopages/2022/infopage.html +++ b/src/infopages/templates/infopages/2022/infopage.html @@ -1,16 +1,12 @@ {% extends '2022/base.html' %} - -{% block global-content %} -
{% for format, content_type, isbn in isbn_formats %}
+ {% for format, content_type, isbn in isbn_formats %}
<dc:relation.hasFormat id="{{ format }}" xmlns:dc="http://purl.org/dc/elements/1.1/">https://wolnelektury.pl/{% if format == 'html' %}katalog/lektura{% else %}media/book/{{ format }}{% endif %}/{{ slug }}.{{ format }}</dc:relation.hasFormat>
<meta refines="#{{ format }}" id="{{ format }}-id" property="dcterms:identifier">ISBN-{{ isbn }}</meta>
<meta refines="#{{ format }}-id" property="identifier-type">ISBN</meta>
<meta refines="#{{ format }}" property="dcterms:format">{{ content_type }}</meta>
{% endfor %}
-{% endblock %}
\ No newline at end of file
+
{% blocktrans with d=waiting.description %}The file you requested was: {{d}}.{% endblocktrans %}
++ + {% blocktrans with d=waiting.description %}The file you requested was: {{d}}.{% endblocktrans %} +
{% blocktrans %}Be aware: Generating the file can take a while. diff --git a/src/wolnelektury/static/2022/more.scss b/src/wolnelektury/static/2022/more.scss index 8f95d12f9..424125394 100644 --- a/src/wolnelektury/static/2022/more.scss +++ b/src/wolnelektury/static/2022/more.scss @@ -318,10 +318,11 @@ form { color: #92BD39; } - > p, form { + > p, form, > .normal-text { min-width: 300px; margin-left: 50px; margin-right: 50px; + width: auto; } } diff --git a/src/wolnelektury/templates/2022/base.html b/src/wolnelektury/templates/2022/base.html index 12bae5959..f314f1f85 100644 --- a/src/wolnelektury/templates/2022/base.html +++ b/src/wolnelektury/templates/2022/base.html @@ -22,6 +22,7 @@ {% tracking_code %} + {% block extrahead %}{% endblock %}
{% include '2022/header.html' %} diff --git a/src/wolnelektury/templates/publish_plan.html b/src/wolnelektury/templates/publish_plan.html index ffc11501e..22e59a97f 100644 --- a/src/wolnelektury/templates/publish_plan.html +++ b/src/wolnelektury/templates/publish_plan.html @@ -1,6 +1,12 @@ -{% extends "base/base.html" %} +{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %} {% load i18n %} +{% block settings %} + {% load title %} + {% trans "Publishing plan" as title %} + {% title title %} +{% endblock %} + {% block titleextra %}{% trans "Publishing plan" %}{% endblock titleextra %} diff --git a/src/wolnelektury/templates/user.html b/src/wolnelektury/templates/user.html index 3adb03028..40c7950d4 100644 --- a/src/wolnelektury/templates/user.html +++ b/src/wolnelektury/templates/user.html @@ -1,7 +1,13 @@ -{% extends "base/base.html" %} +{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %} {% load i18n %} +{% block settings %} + {% load title %} + {% trans "User" as title %} + {% title title %} +{% endblock %} + {% block titleextra %}{% trans "User" %}{% endblock %} {% block body %}