diff --git a/boofilsic/settings.py b/boofilsic/settings.py
index 85ea6bb6..88c60a26 100644
--- a/boofilsic/settings.py
+++ b/boofilsic/settings.py
@@ -86,7 +86,7 @@ if DEBUG:
'NAME': 'test',
'USER': 'donotban',
'PASSWORD': 'donotbansilvousplait',
- 'HOST': '172.18.99.149',
+ 'HOST': '172.17.132.10',
'OPTIONS': {
'client_encoding': 'UTF8',
# 'isolation_level': psycopg2.extensions.ISOLATION_LEVEL_DEFAULT,
diff --git a/users/templates/users/login.html b/users/templates/users/login.html
index eb87b11d..a99a3de6 100644
--- a/users/templates/users/login.html
+++ b/users/templates/users/login.html
@@ -26,7 +26,9 @@
{% if user.is_authenticated %}
{% trans '前往我的主页' %}
{% else %}
- {% trans '使用长毛象授权登录' %}
+ {% trans '使用长毛象授权登录' %}
+
+ {% trans '礼貌站登录入口' %}
{% endif %}
diff --git a/users/views.py b/users/views.py
index 7cd77c3d..c5b57b9f 100644
--- a/users/views.py
+++ b/users/views.py
@@ -59,6 +59,12 @@ def login(request):
f"client_id={CLIENT_ID}&scope=read+write&" +\
f"redirect_uri=https://{request.get_host()}{reverse('users:OAuth2_login')}" +\
"&response_type=code"
+
+ proxy_site_auth_url = f"https://pleasedonotban.com{API_OAUTH_AUTHORIZE}?" +\
+ f"client_id={CLIENT_ID}&scope=read+write&" +\
+ f"redirect_uri=https://{request.get_host()}{reverse('users:OAuth2_login')}" +\
+ "&response_type=code"
+
from boofilsic.settings import DEBUG
if DEBUG:
auth_url = f"https://{MASTODON_DOMAIN_NAME}{API_OAUTH_AUTHORIZE}?" +\
@@ -70,7 +76,8 @@ def login(request):
request,
'users/login.html',
{
- 'oauth_auth_url': auth_url
+ 'oauth_url': auth_url,
+ 'proxy_site_oauth_url': proxy_site_auth_url
}
)
else: