Skip to content

Commit 055ddeb

Browse files
authored
Merge pull request #139 from MahjongRepository/ng-mainline
sync with prod
2 parents 5ae876f + e8ce4a3 commit 055ddeb

File tree

11 files changed

+109
-69
lines changed

11 files changed

+109
-69
lines changed

server/account/urls.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@
66

77
from account.views import account_settings, do_login, request_player_and_user_connection
88

9+
10+
class CustomLogoutView(auth_views.LogoutView):
11+
def dispatch(self, request, *args, **kwargs):
12+
return self.post(request, *args, **kwargs)
13+
14+
915
urlpatterns = [
10-
url(r"^logout/$", auth_views.LogoutView.as_view(), name="logout"),
16+
url(r"^logout/$", CustomLogoutView.as_view(), name="logout"),
1117
url(r"^login/$", do_login, name="do_login"),
1218
url(r"^settings/$", account_settings, name="account_settings"),
1319
path(
3 Bytes
Binary file not shown.

server/locale/ru/LC_MESSAGES/django.po

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2024-12-26 19:55+0000\n"
11+
"POT-Creation-Date: 2025-03-17 21:28+0000\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -509,19 +509,19 @@ msgstr ""
509509
msgid "Substitution player"
510510
msgstr "Игрок замены"
511511

512-
#: player/tenhou/models.py:144
512+
#: player/tenhou/models.py:150
513513
msgid "Ippan"
514514
msgstr "Кю-лобби"
515515

516-
#: player/tenhou/models.py:145
516+
#: player/tenhou/models.py:151
517517
msgid "Joukyuu"
518518
msgstr "Перводан"
519519

520-
#: player/tenhou/models.py:146
520+
#: player/tenhou/models.py:152
521521
msgid "Tokujou"
522522
msgstr "Втородан"
523523

524-
#: player/tenhou/models.py:147
524+
#: player/tenhou/models.py:153
525525
msgid "Houou"
526526
msgstr "Феникс"
527527

@@ -748,7 +748,7 @@ msgstr "Последние 5 турниров"
748748
msgid "all tournaments"
749749
msgstr "все турниры"
750750

751-
#: templates/club/details.html:33 templates/player/details.html:262
751+
#: templates/club/details.html:33 templates/player/details.html:275
752752
msgid "Club statistics"
753753
msgstr "Клубная статистика"
754754

@@ -778,8 +778,8 @@ msgid "Name"
778778
msgstr "Имя"
779779

780780
#: templates/club/details.html:52 templates/ms/ms_accounts.html:31
781-
#: templates/player/details.html:144 templates/player/details.html:154
782-
#: templates/player/details.html:271 templates/player/ms.html:122
781+
#: templates/player/details.html:157 templates/player/details.html:167
782+
#: templates/player/details.html:284 templates/player/ms.html:122
783783
#: templates/player/ms.html:216 templates/player/tenhou.html:166
784784
#: templates/player/tenhou.html:176 templates/player/tenhou.html:229
785785
#: templates/player/tenhou.html:240
@@ -790,37 +790,37 @@ msgstr "Имя"
790790
msgid "Games"
791791
msgstr "Игр"
792792

793-
#: templates/club/details.html:55 templates/player/details.html:144
794-
#: templates/player/details.html:157 templates/player/details.html:274
793+
#: templates/club/details.html:55 templates/player/details.html:157
794+
#: templates/player/details.html:170 templates/player/details.html:287
795795
#: templates/player/ms.html:125 templates/player/ms.html:219
796796
#: templates/player/tenhou.html:166 templates/player/tenhou.html:179
797797
#: templates/player/tenhou.html:229 templates/player/tenhou.html:243
798798
msgid "Avg. place"
799799
msgstr "Ср. место"
800800

801-
#: templates/club/details.html:58 templates/player/details.html:160
802-
#: templates/player/details.html:277 templates/player/ms.html:128
801+
#: templates/club/details.html:58 templates/player/details.html:173
802+
#: templates/player/details.html:290 templates/player/ms.html:128
803803
#: templates/player/ms.html:222 templates/player/tenhou.html:182
804804
#: templates/player/tenhou.html:246
805805
msgid "1st"
806806
msgstr "1-e"
807807

808-
#: templates/club/details.html:61 templates/player/details.html:163
809-
#: templates/player/details.html:280 templates/player/ms.html:131
808+
#: templates/club/details.html:61 templates/player/details.html:176
809+
#: templates/player/details.html:293 templates/player/ms.html:131
810810
#: templates/player/ms.html:225 templates/player/tenhou.html:185
811811
#: templates/player/tenhou.html:249
812812
msgid "2nd"
813813
msgstr "2-е"
814814

815-
#: templates/club/details.html:64 templates/player/details.html:166
816-
#: templates/player/details.html:283 templates/player/ms.html:134
815+
#: templates/club/details.html:64 templates/player/details.html:179
816+
#: templates/player/details.html:296 templates/player/ms.html:134
817817
#: templates/player/ms.html:228 templates/player/tenhou.html:188
818818
#: templates/player/tenhou.html:252
819819
msgid "3rd"
820820
msgstr "3-е"
821821

822-
#: templates/club/details.html:67 templates/player/details.html:169
823-
#: templates/player/details.html:286 templates/player/ms.html:137
822+
#: templates/club/details.html:67 templates/player/details.html:182
823+
#: templates/player/details.html:299 templates/player/ms.html:137
824824
#: templates/player/tenhou.html:191 templates/player/tenhou.html:255
825825
msgid "4th"
826826
msgstr "4-е"
@@ -1010,7 +1010,7 @@ msgstr "санма"
10101010
msgid "Player"
10111011
msgstr "Игрок"
10121012

1013-
#: templates/ms/ms_accounts.html:28 templates/player/details.html:112
1013+
#: templates/ms/ms_accounts.html:28 templates/player/details.html:125
10141014
#: templates/player/tenhou.html:47 templates/player/tenhou.html:126
10151015
#: templates/tenhou/games_history.html:58
10161016
msgid "Rank"
@@ -1030,15 +1030,15 @@ msgstr "Очки"
10301030
msgid "Account"
10311031
msgstr "Аккаунт"
10321032

1033-
#: templates/ms/ms_accounts.html:32 templates/player/details.html:116
1034-
#: templates/player/details.html:144 templates/player/ms.html:109
1033+
#: templates/ms/ms_accounts.html:32 templates/player/details.html:129
1034+
#: templates/player/details.html:157 templates/player/ms.html:109
10351035
#: templates/player/ms.html:202 templates/player/tenhou.html:166
10361036
#: templates/player/tenhou.html:229 templates/tenhou/tenhou_accounts.html:24
10371037
msgid "Last played date"
10381038
msgstr "Дата последней игры"
10391039

10401040
#: templates/player/_changes_table.html:7 templates/player/_deltas_table.html:9
1041-
#: templates/player/details.html:69 templates/player/details.html:212
1041+
#: templates/player/details.html:82 templates/player/details.html:225
10421042
#: templates/player/tenhou.html:297 templates/player/tournaments.html:24
10431043
#: templates/rating/dates.html:16 templates/tenhou/latest_yakumans.html:18
10441044
#: templates/tournament/_tournaments_table.html:9
@@ -1047,7 +1047,7 @@ msgstr "Дата"
10471047

10481048
#: templates/player/_changes_table.html:8
10491049
#: templates/player/_deltas_table.html:10 templates/player/details.html:27
1050-
#: templates/player/details.html:68 templates/player/rating_details.html:48
1050+
#: templates/player/details.html:81 templates/player/rating_details.html:48
10511051
#: templates/player/rating_details.html:83 templates/player/tournaments.html:23
10521052
#: templates/tenhou/games_history.html:59
10531053
msgid "Place"
@@ -1057,7 +1057,7 @@ msgstr "Место"
10571057
msgid "Reason"
10581058
msgstr "Причина"
10591059

1060-
#: templates/player/_deltas_table.html:8 templates/player/details.html:67
1060+
#: templates/player/_deltas_table.html:8 templates/player/details.html:80
10611061
#: templates/player/tournaments.html:22
10621062
msgid "Base rank"
10631063
msgstr "Ранг"
@@ -1072,13 +1072,13 @@ msgstr "Влияние"
10721072
msgid "Coefficient"
10731073
msgstr "Коэффициент"
10741074

1075-
#: templates/player/_deltas_table.html:13 templates/player/details.html:70
1075+
#: templates/player/_deltas_table.html:13 templates/player/details.html:83
10761076
#: templates/player/tournaments.html:25 templates/tenhou/games_history.html:61
10771077
#: templates/tournament/_tournaments_table.html:17
10781078
msgid "Type"
10791079
msgstr "Тип"
10801080

1081-
#: templates/player/_deltas_table.html:14 templates/player/details.html:71
1081+
#: templates/player/_deltas_table.html:14 templates/player/details.html:84
10821082
#: templates/player/tournaments.html:26
10831083
msgid "Tournament"
10841084
msgstr "Турнир"
@@ -1101,70 +1101,70 @@ msgstr "Рейтинг"
11011101
msgid "Scores"
11021102
msgstr "Очки"
11031103

1104-
#: templates/player/details.html:59
1104+
#: templates/player/details.html:72
11051105
msgid "Latest tournaments"
11061106
msgstr "Последние турниры"
11071107

1108-
#: templates/player/details.html:60
1108+
#: templates/player/details.html:73
11091109
msgid "all player tournaments"
11101110
msgstr "все турниры игрока"
11111111

1112-
#: templates/player/details.html:105 templates/player/tenhou.html:5
1112+
#: templates/player/details.html:118 templates/player/tenhou.html:5
11131113
#: templates/player/tenhou.html:328 templates/player/tenhou.html:329
11141114
msgid "Tenhou.net profile"
11151115
msgstr "Tenhou.net профиль"
11161116

1117-
#: templates/player/details.html:106 templates/player/details.html:241
1117+
#: templates/player/details.html:119 templates/player/details.html:254
11181118
msgid "more information"
11191119
msgstr "больше информации"
11201120

1121-
#: templates/player/details.html:110 templates/player/details.html:242
1121+
#: templates/player/details.html:123 templates/player/details.html:255
11221122
#: templates/player/ms.html:100 templates/player/tenhou.html:124
11231123
msgid "Statistics for"
11241124
msgstr "Статистика аккаунта"
11251125

1126-
#: templates/player/details.html:124 templates/player/tenhou.html:132
1126+
#: templates/player/details.html:137 templates/player/tenhou.html:132
11271127
msgid "Latest places:"
11281128
msgstr "Последние игры:"
11291129

1130-
#: templates/player/details.html:142 templates/player/tenhou.html:164
1130+
#: templates/player/details.html:155 templates/player/tenhou.html:164
11311131
msgid "Current month"
11321132
msgstr "За текущий месяц"
11331133

1134-
#: templates/player/details.html:151 templates/player/tenhou.html:173
1134+
#: templates/player/details.html:164 templates/player/tenhou.html:173
11351135
#: templates/player/tenhou.html:237 templates/tenhou/games_history.html:62
11361136
msgid "Lobby"
11371137
msgstr "Лобби"
11381138

1139-
#: templates/player/details.html:207 templates/player/tenhou.html:292
1139+
#: templates/player/details.html:220 templates/player/tenhou.html:292
11401140
msgid "Collected yakumans"
11411141
msgstr "Собранные якуманы"
11421142

1143-
#: templates/player/details.html:211 templates/player/tenhou.html:296
1143+
#: templates/player/details.html:224 templates/player/tenhou.html:296
11441144
#: templates/tenhou/latest_yakumans.html:16
11451145
msgid "Yakuman"
11461146
msgstr "Якуман"
11471147

1148-
#: templates/player/details.html:213 templates/player/tenhou.html:298
1148+
#: templates/player/details.html:226 templates/player/tenhou.html:298
11491149
#: templates/tenhou/latest_yakumans.html:19
11501150
msgid "Log"
11511151
msgstr "Игра"
11521152

1153-
#: templates/player/details.html:227 templates/player/tenhou.html:312
1153+
#: templates/player/details.html:240 templates/player/tenhou.html:312
11541154
#: templates/tenhou/latest_yakumans.html:38
11551155
msgid "link"
11561156
msgstr "ссылка"
11571157

1158-
#: templates/player/details.html:240 templates/player/ms.html:5
1158+
#: templates/player/details.html:253 templates/player/ms.html:5
11591159
#: templates/player/ms.html:284 templates/player/ms.html:285
11601160
msgid "Mahjong Soul profile"
11611161
msgstr "Профиль на Mahjong Soul"
11621162

1163-
#: templates/player/details.html:247 templates/player/ms.html:104
1163+
#: templates/player/details.html:260 templates/player/ms.html:104
11641164
msgid "Four players"
11651165
msgstr "Четыре игрока"
11661166

1167-
#: templates/player/details.html:255 templates/player/ms.html:197
1167+
#: templates/player/details.html:268 templates/player/ms.html:197
11681168
#: templates/tenhou/tenhou_games_async.html:27
11691169
msgid "Sanma"
11701170
msgstr "Санма"
@@ -1805,21 +1805,21 @@ msgstr "ничего не нашлось"
18051805
msgid "Server"
18061806
msgstr "О Сервере"
18071807

1808-
#: templates/website/wrc_2020.html:5 templates/website/wrc_2020.html:10
1808+
#: templates/website/wrc_2020.html:5 templates/website/wrc_2020.html:18
18091809
msgid "World Riichi Championship 2020 Qualifications"
18101810
msgstr "Отбор на Чемпионат Мира 2020 года"
18111811

1812-
#: templates/website/wrc_2020.html:67 templates/website/wrc_2020.html:76
1813-
#: templates/website/wrc_2020.html:77 templates/website/wrc_2025.html:61
1814-
#: templates/website/wrc_2025.html:62
1812+
#: templates/website/wrc_2020.html:75 templates/website/wrc_2020.html:84
1813+
#: templates/website/wrc_2020.html:85 templates/website/wrc_2025.html:98
1814+
#: templates/website/wrc_2025.html:99
18151815
msgid "List of players sorted by RR rating (on 1st February 2020)"
18161816
msgstr "Рейтинг RR на 1 февраля 2020 года."
18171817

1818-
#: templates/website/wrc_2025.html:5 templates/website/wrc_2025.html:10
1818+
#: templates/website/wrc_2025.html:5 templates/website/wrc_2025.html:18
18191819
msgid "World Riichi Championship 2025 Qualifications"
18201820
msgstr "Отбор на Чемпионат Мира 2025 года"
18211821

1822-
#: templates/website/wrc_2025.html:52
1822+
#: templates/website/wrc_2025.html:89
18231823
msgid "List of players sorted by RR rating (on 3st February 2025)"
18241824
msgstr "Рейтинг RR на 3 февраля 2025 года."
18251825

@@ -2027,7 +2027,7 @@ msgstr ""
20272027
"ли привозить другие. А также все пожелания или потребности для проведения "
20282028
"данного турнира."
20292029

2030-
#: tournament/views.py:237 tournament/views.py:322
2030+
#: tournament/views.py:237 tournament/views.py:321
20312031
msgid ""
20322032
"Your registration was accepted! It will be visible on the page after "
20332033
"administrator approvement."
@@ -2039,15 +2039,15 @@ msgstr ""
20392039
msgid "You already registered to the tournament!"
20402040
msgstr "Вы ранее уже зарегистрировались на этот турнир!"
20412041

2042-
#: tournament/views.py:326
2042+
#: tournament/views.py:325
20432043
msgid "Your registration was accepted!"
20442044
msgstr "Регистрация принята!"
20452045

2046-
#: tournament/views.py:332
2046+
#: tournament/views.py:331
20472047
msgid "Please, allow to store personal data"
20482048
msgstr "Пожалуйста, разрешите сохранять персональные данные"
20492049

2050-
#: utils/new_pantheon.py:111
2050+
#: utils/new_pantheon.py:125
20512051
msgid "There is no user email in the registration."
20522052
msgstr "В регистрации не найдена почта пользователя."
20532053

server/mahjong_portal/settings.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@
113113

114114
# Database
115115
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases
116-
117-
DATABASES = {"default": dj_database_url.config()}
116+
db_config_dict = dj_database_url.config()
117+
db_config_dict["OPTIONS"] = {"pool": False}
118+
DATABASES = {"default": db_config_dict}
118119

119120
if os.environ.get("PANTHEON_DB_URL"):
120121
DATABASES["pantheon"] = dj_database_url.parse(os.environ.get("PANTHEON_DB_URL"))
@@ -143,8 +144,6 @@
143144

144145
USE_I18N = True
145146

146-
USE_L10N = True
147-
148147
USE_TZ = True
149148

150149

server/requirements/base.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
gunicorn==23.0.0
33

44
# main deps
5-
Django==4.2.16
5+
Django==5.1.7
66
django-modeltranslation==0.18.10
7-
psycopg==3.2.1
8-
psycopg2==2.9.9
7+
psycopg==3.2.5
8+
psycopg2==2.9.10
99
psycopg2cffi==2.9.0
1010
django-bootstrap5==23.3
1111
dj-database-url==2.0.0
@@ -33,7 +33,7 @@ django-haystack==3.3.0
3333
Whoosh==2.7.4
3434

3535
# for web parsing
36-
beautifulsoup4==4.12.2
36+
beautifulsoup4==4.13.3
3737
requests==2.32.3
3838

3939
# for monitoring

server/static/js/jquery.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/templates/website/server_en.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ <h1>About server</h1>
1616
<div class="card mb-4">
1717
<div class="card-body">
1818
<h5 class="card-title">Mahjong portal work on:</h5>
19-
<p class="card-text">&bull; Django framework 4</p>
19+
<p class="card-text">&bull; Django framework 5</p>
2020
<p class="card-text">&bull; {{ platform_name }}</p>
21-
<p class="card-text">&bull; PostgreSQL 15</p>
21+
<p class="card-text">&bull; {{ db_backend }}</p>
2222
</div>
2323
</div>
2424
</div>

server/templates/website/server_ru.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ <h1>О сервере</h1>
1616
<div class="card mb-4">
1717
<div class="card-body">
1818
<h5 class="card-title">Маджонг портал работает на:</h5>
19-
<p class="card-text">&bull; Django framework 4</p>
19+
<p class="card-text">&bull; Django framework 5</p>
2020
<p class="card-text">&bull; {{ platform_name }}</p>
21-
<p class="card-text">&bull; PostgreSQL 15</p>
21+
<p class="card-text">&bull; {{ db_backend }}</p>
2222
</div>
2323
</div>
2424
</div>

0 commit comments

Comments
 (0)