Не отображается страница, NoReverseMatch at /1
Reverse for 'relate' with arguments '(",)' not found. 1 pattern(s) tried: ['(?P<programmer_id>[0-9]+)\\/relate$']
Error during template rendering
In template /home/msh/myproject/newapp/templates/base.html, error at line 0
Reverse for 'relate' with arguments '('',)' not found. 1 pattern(s) tried: ['(?P<programmer_id>[0-9]+)\\/relate$']
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>{% block title %}{% endblock %}</title>
5 <style>{% block style %}{% endblock %}</style>
6 </head>
7
8 <body>
9 {% block body %}
10 {% endblock %}
В этом файле base.html в принципе не отображатеся line 0. Помогите, разобраться.
prog.html
{% extends "base.html" %}
{% block body %}
<h1> {{ prog.full_name }}</h1>
<ul>
<li>Age: {{ prog.age }}</li>
<li>Occupation: {{ prog.position }}</li>
</ul>
<h2>Contribution</h2>
<ul>
{% for cont in contribution %}
<li>{{cont}}</li>
{% empty %}
<li>No contribution</li>
{% endfor %}
</ul>
<hr>
<h2>Add Contribution </h2>
{% if new_contribution %}
<form action="{% url 'relate' programmer.id %}" method="POST">
<select name="contribution">
{% for contribution in new_contribution %}
<option value="{{contribution.id}}">{{ contribution }}</option>
{% endfor %}
</select>
<input type="submit" value="add contribution"/>
</form>
{% else %}
<div>No contribution to add</div>
{% endif %}
<a href="{% url 'index' %}">Back to full listing</a>
{% endblock %}
urls.py
urlpatterns=[
path("", views.index, name='index'),
path("<int:programmer_id>",views.prog, name='prog'),
path("<int:programmer_id>/relate", views.relate, name='relate')