错误的子标题是:
"模板渲染期间出错
在第0行的... / base.html错误
cursor" _django_curs_139683611834112_1"不存在
目前在运行带有docker的Ubuntu的服务器上使用Django 2.0和Python 3.6。通过以下流加载空白URL时发生错误:
urls.py:
from dashboard2.account_views_new import AccountView
'''urlpatterns = [
url(r'^$', AccountView.as_view(), name='home'),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
的观点:
class AccountView(TemplateView):
template_name = 'fv1/dash_nav.html'
def get(self, request):
this_form = forms.ThisForm()
that_form = forms.ThatForm()
forms = Form.objects.all()
things = Things.objects.all()
return render(request, self.template_name)
def post(self, request):
this = that1.objects.all()
that = this1.objects.all()
return render(request, self.template_name, {data})
base.html(错误在第0行引发):
<!-- update this to include headers and such in jynja -->
<!DOCTYPE html>
<html lang="en">
{% load static %}
<head>
产生此错误的原因是什么?