答案 0 :(得分:0)
urlpatterns = [
path('accounts', views.accounts,name='accounts'),
path('friends',views.friends,name='friends'),
path('about',views.about,name='about'),
path('photo',views.photo,name='photo'),
path('video',views.video,name='video'),
path('favpage',views.favpage,name='favpage'),
path('accountsetting', views.accountsetting, name='accountsetting'),
path('personalinfo', views.personalinfo, name='personalinfo'),
path('favpagecreate', views.favpagecreate, name='favpagecreate'),
path('friendgroup', views.friendgroup,name='friendgroup'),
path('Hobbies', views.Hobbies, name='Hobbies'),
path('notification', views.notification,'notification'), # this one
path('Education', views.Education, name='Education'),
path('changepass', views.changepass, name='changepass'),
path('chatmessage', views.chatmessage, name='chatmessage'),
path('friendrequest', views.friendrequest, name='friendrequest'),
]
正如我在评论中提到的那样,您缺少name=
部分,因此它将其作为kwargs
值,该值用于将关键字参数放入视图函数中。如果您修复了该部分,错误应该会消失。