这是我的个人/ urls.py。我一直试图解决这个问题很多天。我知道这肯定是一个非常愚蠢的错误,但我们将不胜感激。
from django.conf.urls import url, include
from . import views
urlpatterns = [
url(r'^$',views.index, name='index'),
url(r'contact/',views.contact, name='contact')
url(r'about/',views.about, name='about')
]
这是views.py
def index(request):
return render(request, 'personal/home.html')
def contact(request):
return render(request, 'personal/basic.html', {'content':['https://www.facebook.com/arjunkashyap30']})
def about(request):
return render(request, 'personal/about.html', {'content': ["This is an abut
page"]})
答案 0 :(得分:3)
您在定义的每个端点的末尾忘记了comma
。
urlpatterns = [
url(r'^$',views.index, name='index'),
url(r'contact/',views.contact, name='contact'),
url(r'about/',views.about, name='about'),
]