定义 url 时,我不断收到一个奇怪的错误:
AttributeError at /
'tuple' object has no attribute 'get'
Request Method: GET
Request URL: http://localhost:51942/
Django Version: 2.1.3
Exception Type: AttributeError
Exception Value:
'tuple' object has no attribute 'get'
这是我的网址:
from django.contrib import admin
from django.urls import path
from saeed import views
urlpatterns = [
path('admin/', admin.site.urls),
path('', views.index, name="index"),
]
这是我的观点:
from django.shortcuts import render
def index(request):
return render,"index.html"
请通知我。谢谢,赛义德
跃然一笑
相关分类