搞定docker所需的通过环境变量控制
This commit is contained in:
@@ -6,7 +6,7 @@ import hmac
|
||||
from django.http import JsonResponse, HttpResponseBadRequest
|
||||
from django.shortcuts import render, redirect
|
||||
from django.views.decorators.http import require_http_methods
|
||||
from django.views.decorators.csrf import csrf_protect
|
||||
from django.views.decorators.csrf import csrf_protect, ensure_csrf_cookie
|
||||
from django.conf import settings
|
||||
|
||||
from .es_client import get_user_by_username
|
||||
@@ -14,6 +14,7 @@ from .crypto import salt_for_username, hmac_sha256
|
||||
|
||||
|
||||
@require_http_methods(["GET"])
|
||||
@ensure_csrf_cookie
|
||||
def login_page(request):
|
||||
return render(request, "accounts/login.html")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user