为了账号安全,请及时绑定邮箱和手机立即绑定

无法解析其余部分:'!= None'从'!= None'| Django管理员

无法解析其余部分:'!= None'从'!= None'| Django管理员

慕村9548890 2021-04-09 17:54:50
以前静态文件停止在Django Admin上运行(页面未设置样式),但是当我从admin注销后,它开始在登录页面上发出此错误:无法解析其余部分:'!= None'from'!= None'。sin-in django-admin中的错误:settings.py"""Django settings for ucodin_web_app project.Generated by 'django-admin startproject' using Django 1.11.For more information on this file, seehttps://docs.djangoproject.com/en/1.11/topics/settings/For the full list of settings and their values, seehttps://docs.djangoproject.com/en/1.11/ref/settings/"""import os# Build paths inside the project like this: os.path.join(BASE_DIR, ...)BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))# Quick-start development settings - unsuitable for production# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/# SECURITY WARNING: keep the secret key used in production secret!SECRET_KEY = 'h_ipm50aodqptweir*e3v4!#82%9i!l#6uuxo=w@7v&8ims*7v'# SECURITY WARNING: don't run with debug turned on in production!DEBUG = TrueALLOWED_HOSTS = []# Application definitionINSTALLED_APPS = [    'django.contrib.admin',    'django.contrib.auth',    'django.contrib.contenttypes',    'django.contrib.sessions',    'django.contrib.messages',    'django.contrib.staticfiles',    'articles',    'quizzes',    'tutorials',    'channels',    'lib',]MIDDLEWARE = [    'django.middleware.security.SecurityMiddleware',    'django.contrib.sessions.middleware.SessionMiddleware',    'django.middleware.common.CommonMiddleware',    'django.middleware.csrf.CsrfViewMiddleware',    'django.contrib.auth.middleware.AuthenticationMiddleware',    'django.contrib.messages.middleware.MessageMiddleware',    'django.middleware.clickjacking.XFrameOptionsMiddleware',]ROOT_URLCONF = 'ucodin_web_app.urls'我也没有对管理员进行任何更改。
查看完整描述

1 回答

?
胡说叔叔

TA贡献1804条经验 获得超8个赞

空格很重要。更改以下行:

{% if widget.value !=None %}

{% if widget.value != None %}


查看完整回答
反对 回复 2021-04-27
  • 1 回答
  • 0 关注
  • 257 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信