修复csrf引起的run无法启用问题

This commit is contained in:
kingmo888 2023-12-10 18:55:57 +08:00
parent ad28fccc21
commit bb5dcfd488

View File

@ -23,7 +23,7 @@ CSRF_TRUSTED_ORIGINS = [os.environ.get("CSRF_TRUSTED_ORIGINS", "http://www.baidu
SECRET_KEY = 'j%7yjvygpih=6b%qf!q%&ixpn+27dngzdu-i3xh-^3xgy3^nnc'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
DEBUG = True
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
ALLOWED_HOSTS = ["*"]
AUTH_USER_MODEL = 'api.UserProfile' #AppName.自定义user
@ -63,6 +63,7 @@ TEMPLATES = [
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'api.util.settings',
],
},
},