Python 找不到参数为“(“”,)”且关键字参数为“{}”的“详细信息”的反转。尝试了1个模式:
这里是Django/Python新手。我使用的是python 3.4和Django 1.7版本 我试图得到我的超链接加载索引页,我看到这个问题 My index.html删除了不需要的行Python 找不到参数为“(“”,)”且关键字参数为“{}”的“详细信息”的反转。尝试了1个模式:,python,django,Python,Django,这里是Django/Python新手。我使用的是python 3.4和Django 1.7版本 我试图得到我的超链接加载索引页,我看到这个问题 My index.html删除了不需要的行 <form action="{% url 'testapp:search' %}" method="get"> {% csrf_token %} <a href="{% url 'testapp:detail' morphological %}"">Morphologi
<form action="{% url 'testapp:search' %}" method="get">
{% csrf_token %}
<a href="{% url 'testapp:detail' morphological %}"">Morphological</a>
</form>
我试图在单击链接时传递一个参数,并使用该参数查询数据库。我尝试了各种各样的方法,在这一点上我被卡住了。我想要一个字符串,而不是我在标准轮询应用程序中使用的主键。只是我的正则表达式错了吗
任何帮助解决这个问题都会大有裨益。谢谢。在URL中的参数周围加上单引号:
<a href="{% url 'testapp:detail' 'morphological' %}"">Morphological</a>
在URL中的参数周围加上单引号:
<a href="{% url 'testapp:detail' 'morphological' %}"">Morphological</a>
<a href="{% url 'testapp:detail' 'morphological' %}"">Morphological</a>