【发布时间】:2019-12-07 22:01:05
【问题描述】:
我正在尝试重构我的一些代码,使其保持一致,即名称:
path('create_project', ProjectCreateView.as_view(), name='create-project'),
我也在我的模板中更改了它:
<a href="create-project">
<img src="{% static 'project_portal/image/icon_add_circle.png' %}" alt="Add" width="32">
</a>
但现在我得到以下信息:
Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/si/create-project/
Raised by: project_portal.views.ProjectDetailView
将“_”更改为“-”如何破坏代码?
【问题讨论】:
标签: django django-templates django-urls