Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/19.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 无法解析url。收到错误-与x27相反;satchmo#u搜索';带参数';()';和关键字参数';{}';找不到_Python_Django_Satchmo_Webfaction - Fatal编程技术网

Python 无法解析url。收到错误-与x27相反;satchmo#u搜索';带参数';()';和关键字参数';{}';找不到

Python 无法解析url。收到错误-与x27相反;satchmo#u搜索';带参数';()';和关键字参数';{}';找不到,python,django,satchmo,webfaction,Python,Django,Satchmo,Webfaction,我正在按照以下说明安装Satchmo: 当我想检查我的安装时,我得到以下错误: $ python manage.py satchmo_check Checking your satchmo configuration. Using Django version 1.2.5 Using Satchmo version 0.9.2-pre hg-unknown The following errors were found: Unable to resolve url. Received error

我正在按照以下说明安装Satchmo:

当我想检查我的安装时,我得到以下错误:

$ python manage.py satchmo_check
Checking your satchmo configuration.
Using Django version 1.2.5
Using Satchmo version 0.9.2-pre hg-unknown
The following errors were found:
Unable to resolve url. Received error- Reverse for 'satchmo_search' with arguments '()' and keyword arguments '{}' not found.
我的
url.py
如下所示:

from django.conf.urls.defaults import *
from satchmo_store.urls import urlpatterns

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('',
    # Example:
    # (r'^myproject/', include('myproject.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    # (r'^admin/', include(admin.site.urls)),
)
使用命令行上的
reverse
功能,我得到:

$ python manage.py shell
Python 2.7.1 (r271:86832, Dec  1 2010, 06:29:57) 
>>> from django.core.urlresolvers import reverse
>>> reverse(satchmo_search)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
NameError: name 'satchmo_search' is not defined
$python manage.py shell
Python 2.7.1(r271:868321010年12月1日06:29:57)
>>>从django.core.urlResolver反向导入
>>>反向(satchmo_搜索)
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
NameError:未定义名称“satchmo_搜索”

我是Satchmo和Django的新手,如果您有任何帮助,我将不胜感激。

您正在覆盖正在导入的URL

更改URL.py文件,如下所示:

from django.conf.urls.defaults import *
from satchmo_store.urls import urlpatterns

urlpatterns += patterns('',

    # Your urls go here

)


您正在覆盖要导入的URL

更改URL.py文件,如下所示:

from django.conf.urls.defaults import *
from satchmo_store.urls import urlpatterns

urlpatterns += patterns('',

    # Your urls go here

)