我如何访问 Django 2.0 中的下一页

How I can access to the next page in django 2.0

我有以下风景。 In the first page there are type of products, when choose specific type it sends to the page of products of the specific type, then when I choose the product it should send me to the page of the product where there is full information about the product .但是我无法访问上一个产品页面。我应该如何解决这个问题?我的代码:

views.py:

def products_fizlitso(request):

 fizlitso_product = InsuranceProducts.objects.filter(product_type="Физическое 
 Лицо")

 context = {'fizlitso_product': fizlitso_product}
 return render(request, 'insurance_products/fizlitso/fizlitso.html', context)


def fizlitso_type(request, type_id):

 product_type = get_object_or_404(InsuranceProducts, id=type_id)

 context = {'product_type': product_type}
 return render(request, 'insurance_products/fizlitso/fizlitso_type.html', 
 context)

def product_page(request, product_id):

 product = get_object_or_404(ProductType, id=product_id)

 context = {'product': product}
 return render(request, 'insurance_products/fizlitso/product.html', context)

这里是urls.py:

# ******************************************************************
path('fizlitso/', views.products_fizlitso, name='product_fizlitso'),
# ******************************************************************

# ******************************************************************
path('fizlitso/product_type<int:type_id>', views.fizlitso_type, name='fizlitso_type'),
# ******************************************************************

# ******************************************************************
path('fizlitso/product_type<int:type_id>/product<int:product_id>', views.product_page, name='product_page'),
# ******************************************************************

这里是包含所有产品类型的模板的 django 部分:

  {% for product in fizlitso_product %}
  <div class="btmspace-80">
    <h3>{{ product.product_area }}</h3>
    <img class="imgr borderedbox inspace-5" src="{% static 'img/imgr.gif' %}" alt="">
    <p>
        {{ product.product_description }}
    </p>

    <p>
        Подробно вы можете узнать <a href="{% url 'main:fizlitso_type' product.id %}">здесь</a></a>
    </p>
  </div>
  {% endfor %}

这里是模板的 django 部分,其中包含特定类型的所有产品:

  {% for product in product_type.producttype_set.all %}
  <div class="btmspace-80">
    <h3>{{ product.title }}</h3>
    <img class="imgr borderedbox inspace-5" src="{% static 'img/imgr.gif' %}" alt="">
    <p>
        {{ product.description }}
    </p>

    line 84  <p>
      Подробно вы можете узнать <a href="{% url 'main:product_page' product.id %}">здесь</a></a>
    </p>
  </div>
  {% endfor %}

这里是关于从上面页面中选择的特定产品的页面:

    <div class="btmspace-80">
    <h3>{{ product.title }}</h3>
    <img class="imgr borderedbox inspace-5" src="{% static 'img/imgr.gif' %}" alt="">
    <p>
        {{ product.description }}
    </p>
  </div>

而这个是错误的:

NoReverseMatch at /fizlitso/product_type1

Reverse for 'product_page' with arguments '('',)' not found. 1 pattern(s) tried: ['fizlitso\/product_type(?P[0-9]+)\/product(?P[0-9]+)$']

C:\Users\Lenovo 101\PycharmProjects\uzagro_3\main\templates\insurance_products\fizlitso\fizlitso_type.html, error at line 84

你的url名字product_page有两个parameters:type_id,product_id

path('fizlitso/product_type<int:type_id>/product<int:product_id>', views.product_page, name='product_page')

你给一个吗?

<a href="{% url 'main:product_page' product.id %}">