Джанго не может найти путь к привязке. Текст ошибки: The current path, to_write, didn't match any of these
`urls.py:
urlpatterns = [
path('', views.index, name = 'index'),
path('<int:history_id>/', views.detail, name = 'detail'),
path('<int:history_id>/leave_comment/', views.leave_comment, name = 'leave_comment'),
path('<int:to_write>/', views.to_write ,name = 'to_write'),
]`
views.py:
def to_write(request):
return render(request, 'history/list.html')
list.html:
{% extends 'to_write.html'%}
{% block title%}Напиши историю своих предков!{% endblock %}
{% block content %} Lorem Ipsum{% endblock %}
to_write.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{% block title%}{% endblock %}</title>
</head>
<body>
{%block content%}{% endblock %}
</body>
</html>
Ответы (1 шт):
Автор решения: user355827
→ Ссылка
единственное, что можно предположить, из того что вы скинули это надо исправить
path('<int:to_write>/', views.to_write ,name = 'to_write')
на
path('to_write/', views.to_write ,name = 'to_write')