From d23130a73bdacdc6e86de46abd8ba7cc4c463f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=94=E5=90=AC=E9=A3=8E=E5=90=9F?= Date: Wed, 23 Mar 2022 14:39:45 +0800 Subject: [PATCH] Update settings.py --- djangoblog/settings.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/djangoblog/settings.py b/djangoblog/settings.py index c0cccd7..a00c7c4 100644 --- a/djangoblog/settings.py +++ b/djangoblog/settings.py @@ -35,8 +35,10 @@ TESTING = len(sys.argv) > 1 and sys.argv[1] == 'test' # ALLOWED_HOSTS = [] ALLOWED_HOSTS = ['*', '127.0.0.1', 'example.com'] -# Application definition +# django 4.0新增配置 CSRF_TRUSTED_ORIGINS = ['http://example.com'] +# Application definition + INSTALLED_APPS = [ # 'django.contrib.admin',