Django bug:在/ databrowse /中配置不正确。如何解决这个bug?

时间:2011-06-01 09:24:38

标签: django

我项目的urls.py看起来像这样

from django.conf import settings
from django.conf.urls.defaults import *
from django.contrib import admin
from django.contrib import databrowse

from world.views import welcome
admin.autodiscover()

urlpatterns = patterns('',
    (r'^$', welcome),
    (r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^databrowse/', include(databrowse.site.root)),
)


urlpatterns += patterns('',
        (r'^media/$',include('django.views.static.serve'),{'document_root': settings.MEDIA_ROOT, 'show_indexes': True})
    )

要做些什么改变才能发挥作用?

1 个答案:

答案 0 :(得分:3)

您必须做的唯一更改是遵循实际的documentation。该文档不使用include进行数据存储。