From 583d9d885bf6ec3bfa3884d41090699237efb400 Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Tue, 19 Sep 2023 14:01:29 +0800 Subject: [PATCH] *: fix typo --- apps/sspanel/urls.py | 2 +- apps/sspanel/views.py | 4 ++-- templates/web/{social_login.html => telegram_login.html} | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename templates/web/{social_login.html => telegram_login.html} (92%) diff --git a/apps/sspanel/urls.py b/apps/sspanel/urls.py index 99a524e5d8..f98183a154 100644 --- a/apps/sspanel/urls.py +++ b/apps/sspanel/urls.py @@ -13,7 +13,7 @@ # 注册/登录 path("register/", views.RegisterView.as_view(), name="register"), path("login/", views.UserLogInView.as_view(), name="login"), - path("login/telegram/", views.TeleGramLoginView.as_view(), name="telegram_login"), + path("login/telegram/", views.TelegramLoginView.as_view(), name="telegram_login"), path("logout/", views.UserLogOutView.as_view(), name="logout"), path( "user_traffic_log/", views.UserTrafficLogView.as_view(), name="user_traffic_log" diff --git a/apps/sspanel/views.py b/apps/sspanel/views.py index 5381957a4f..6c8a631589 100644 --- a/apps/sspanel/views.py +++ b/apps/sspanel/views.py @@ -103,7 +103,7 @@ def get(self, request): return render(request, "web/login.html", context=context) -class TeleGramLoginView(View): +class TelegramLoginView(View): def get(self, request): try: result = verify_telegram_authentication( @@ -139,7 +139,7 @@ def get(self, request): context = { "form": TGLoginForm(initial={"tg_username": tg_username}), } - return render(request, "web/social_login.html", context) + return render(request, "web/telegram_login.html", context) def post(self, request): form = TGLoginForm(request.POST) diff --git a/templates/web/social_login.html b/templates/web/telegram_login.html similarity index 92% rename from templates/web/social_login.html rename to templates/web/telegram_login.html index f26b2700f0..9cedc0bda7 100644 --- a/templates/web/social_login.html +++ b/templates/web/telegram_login.html @@ -15,7 +15,7 @@

-
+ {% csrf_token %} {{ form.non_field_errors }} {% for field in form %} {{ field.label_tag }} {{ field }} {{ field.errors }} {% if field.help_text %}