Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/358.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 找不到参数为“(“”,)”且关键字参数为“{}”的“详细信息”的反转。尝试了1个模式:_Python_Django - Fatal编程技术网

Python 找不到参数为“(“”,)”且关键字参数为“{}”的“详细信息”的反转。尝试了1个模式:

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

这里是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 %}"">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>