我已经通过pip install安装了grappelli(请确保随后对其进行了更新)。
我将它放在INSTALLED_APPS中的django.contrib.admin之前:

INSTALLED_APPS = (
    ...
    'grappelli',
    'django.contrib.admin',

我的urls.py看起来像这样:

url(r'^grappelli/', include('grappelli.urls')),
url(r'^admin/', include(admin.site.urls)),

仍然出现错误:

Using the URLconf defined in _myWebsite.urls, Django tried these URL patterns, in this order:
^grappelli/ ^lookup/related/$ [name='grp_related_lookup']
^grappelli/ ^lookup/m2m/$ [name='grp_m2m_lookup']
^grappelli/ ^lookup/autocomplete/$ [name='grp_autocomplete_lookup']
^admin/
^categories/$
The current URL, grappelli/, didn't match any of these.



我究竟做错了什么?

最佳答案

您必须运行syncdb命令

关于python - django:grappelli:路由失败,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/9501623/

10-12 18:42