Page not found (404) Request Method: GET Request URL: http://beta.mysite.com/admin/filebrowser/
The requested admin page does not exist.
django-filebrowser
要求:
- django 1.0+(我有 1.1)
- PIL(我安装了
python-imaging
) - Grappelli(我安装了最新的 svn trunk,确认它有效)
对于文件浏览器 I:
- 查看最新的svn,放入python路径
- 将媒体文件复制到静态主机
- 将文件浏览器添加到
settings.py
,确认它已拾取它,因为它曾经抛出一个异常,表明在我安装它之前未安装 PIL - 我将确切的 url 行添加到 urls.py:
(r'^admin/filebrowser/', include('filebrowser.urls')),
需要注意的一点是,我没有修改文件浏览器settings.py。
我的网站管理员工作正常,grappelli 应用于管理员,我尝试使用尾部斜杠 http://site.com/admin/filebrowser/
,我的网址有一个尾部斜杠,这是完整的 url.py:
urlpatterns = patterns('',
(r'^$', 'django.views.generic.simple.direct_to_template', {'template':'homepage.html'}),
# Uncomment the next line to enable the admin:
(r'^admin/filebrowser/', include('filebrowser.urls')),
(r'^admin/', include(admin.site.urls)),
# add this or you'll get some error:
# Reverse for 'grp_bookmark_get' with arguments
(r'^grappelli/', include('grappelli.urls')),
(r'^search/$', 'site.search.views.search'),
(r'', include('django.contrib.flatpages.urls')),
)
最佳答案
freenode/#django 上的 apollo13 解决了这个问题。我应该去 /admin/filebrowser/browse
。
关于django-filebrowser 无法访问并抛出 404,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2214597/