Skip to content

Commit 29cfba9

Browse files
authored
Merge 29bf145 into 3ca3130
2 parents 3ca3130 + 29bf145 commit 29cfba9

File tree

6 files changed

+34
-27
lines changed

6 files changed

+34
-27
lines changed

.github/workflows/django.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ jobs:
3939
uses: actions/setup-python@v2
4040
with:
4141
python-version: ${{ matrix.python-version }}
42+
- name: Install system dependencies
43+
run: |
44+
sudo apt-get update
45+
sudo apt-get install libjpeg-dev
4246
- name: Install Dependencies
4347
run: |
4448
python -m pip install --upgrade pip

is_core/exceptions/response.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ class HttpDuplicateResponseException(ResponseException):
135135
status_code = 409
136136

137137

138+
class HttpUnprocessableEntityResponseException(ResponseException):
139+
140+
title = _('Unprocessable entity')
141+
status_code = 422
142+
143+
138144
class HttpServiceUnavailableException(ResponseException):
139145

140146
title = _('Temporarily unavailable')
0 Bytes
Binary file not shown.

is_core/locale/cs/LC_MESSAGES/django.po

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: 0.4.5\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2022-12-30 16:55+0100\n"
10+
"POT-Creation-Date: 2025-03-06 09:51+0100\n"
1111
"PO-Revision-Date: 2016-01-14 15:22+0100\n"
1212
"Last-Translator: FULL NAME <matllubos@gmail.com>\n"
1313
"Language-Team: \n"
@@ -18,17 +18,17 @@ msgstr ""
1818
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
1919
"X-Generator: Poedit 1.8.1\n"
2020

21-
#: actions.py:47 templates/is_core/forms/inline_table.html:89
21+
#: actions.py:50 templates/is_core/forms/inline_table.html:89
2222
#: templates/is_core/generic_views/base_table.html:128 utils/__init__.py:290
2323
msgid "Yes"
2424
msgstr "Ano"
2525

26-
#: actions.py:48 templates/is_core/forms/inline_table.html:89
26+
#: actions.py:51 templates/is_core/forms/inline_table.html:89
2727
#: templates/is_core/generic_views/base_table.html:128 utils/__init__.py:290
2828
msgid "No"
2929
msgstr "Ne"
3030

31-
#: actions.py:49 templates/is_core/forms/inline_table.html:89
31+
#: actions.py:52 templates/is_core/forms/inline_table.html:89
3232
#: templates/is_core/generic_views/base_table.html:128
3333
msgid "Are you sure?"
3434
msgstr "Jste si jisti?"
@@ -108,6 +108,10 @@ msgid "Conflict/Duplicate"
108108
msgstr "Konflikt/Duplikace"
109109

110110
#: exceptions/response.py:140
111+
msgid "Unprocessable entity"
112+
msgstr "Nezpracovatelná entita"
113+
114+
#: exceptions/response.py:146
111115
msgid "Temporarily unavailable"
112116
msgstr "Služba je dočasně nedostupná"
113117

@@ -138,7 +142,7 @@ msgstr "Položka \"%(obj)s\" typu %(name)s byla úspěšně přidána."
138142
msgid "Please correct the error below."
139143
msgstr "Prosím opravte níže uvedené chyby."
140144

141-
#: generic_views/base.py:203 main.py:373
145+
#: generic_views/base.py:203 main.py:374
142146
msgid "Home"
143147
msgstr "Home"
144148

@@ -184,33 +188,29 @@ msgstr "Neukládat a vrátit se na seznam"
184188
msgid "There are no items"
185189
msgstr "Žádné položky"
186190

187-
#: main.py:482
191+
#: main.py:483
188192
msgid "object name"
189193
msgstr ""
190194

191-
#: main.py:611
195+
#: main.py:612
192196
#, python-format
193197
msgid "Do you really want to delete \"%s\""
194198
msgstr "Opravdu chcete odstranit položku \"%s\""
195199

196-
#: main.py:613
200+
#: main.py:614
197201
msgid "Delete"
198202
msgstr "Smazat"
199203

200-
#: main.py:614
204+
#: main.py:615
201205
#, python-format
202206
msgid "Record \"%s\" was deleted"
203207
msgstr "Záznam \"%s\" byl smazán"
204208

205-
#: main.py:718
209+
#: main.py:719
206210
msgid "Detail"
207211
msgstr "Detail"
208212

209-
#: middleware.py:33
210-
msgid "Unprocessable Entity"
211-
msgstr "Nezpracovatelná entita"
212-
213-
#: middleware.py:35
213+
#: middleware.py:32
214214
msgid "Not Found"
215215
msgstr "Nenalezeno"
216216

@@ -319,13 +319,13 @@ msgstr "Znovu načíst data a zobrazit celkový počet řádků"
319319
#: templates/is_core/generic_views/base_table.html:109
320320
#, python-format
321321
msgid ""
322-
"There are some filters on hidden fields: <span class=\"columns\">"
323-
"%(columns)s</span>. Do you want to <span class=\"delete-filtering\">delete "
324-
"filtering</span>?"
322+
"There are some filters on hidden fields: <span "
323+
"class=\"columns\">%(columns)s</span>. Do you want to <span class=\"delete-"
324+
"filtering\">delete filtering</span>?"
325325
msgstr ""
326-
"Na skryté sloupce jsou aplikovány filtry: <span class=\"columns\">"
327-
"%(columns)s</span>. Opravdu chcete <span class=\"delete-filtering"
328-
"\">odstranit filtrování </span>?"
326+
"Na skryté sloupce jsou aplikovány filtry: <span "
327+
"class=\"columns\">%(columns)s</span>. Opravdu chcete <span class=\"delete-"
328+
"filtering\">odstranit filtrování </span>?"
329329

330330
#: templates/is_core/forms/inline_table.html:89
331331
#: templates/is_core/generic_views/base_table.html:128
@@ -383,11 +383,11 @@ msgstr "Přihlásit se"
383383
msgid "Please Sign In"
384384
msgstr "Prosím přihlaste se"
385385

386-
#: templates/is_core/login.html:17
386+
#: templates/is_core/login.html:18
387387
msgid "Fill your credentials"
388388
msgstr "Vyplňte své přihlašovací údaje"
389389

390-
#: templates/is_core/login.html:21
390+
#: templates/is_core/login.html:24
391391
msgid "OR"
392392
msgstr "NEBO"
393393

is_core/middleware.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from django.http.response import Http404
2-
from django.core.exceptions import ValidationError
32
from django.utils.encoding import force_str
43
from django.utils.translation import gettext
54
from django.urls import resolve, Resolver404
@@ -29,7 +28,5 @@ class HttpExceptionsMiddleware(MiddlewareMixin):
2928
def process_exception(self, request, exception):
3029
if isinstance(exception, ResponseException):
3130
return exception.get_response(request)
32-
if isinstance(exception, ValidationError):
33-
return response_exception_factory(request, 422, gettext('Unprocessable Entity'), exception.messages)
3431
if not settings.DEBUG and isinstance(exception, Http404):
3532
return response_exception_factory(request, 404, gettext('Not Found'), force_str(exception))
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% extends 'is_core/base.html' %}
22
{% load i18n %}
33

4-
{% block base %}
4+
{% block content %}
55
<h2 class="error-403">{{ title|capfirst }} ({{ response_code }})</h2>
66
{% if message %}<p>{{ message }}</p>{% endif %}
77
{% endblock %}

0 commit comments

Comments
 (0)