开发者

How to use Django-filer(asset file manager)?

Can someone point me in the right direction on how to use Django-filer? I have installed the necessary tools for the filer to work and I get the Filer tab in the admin interface, but when I upload an image to the app I am not able to get the preview thumbimage. The image is also uploaded to the Media_root path(Public file开发者_如何转开发s default path). What else have I missed?


Had a similar problem. I had missed that when easy_thumbnails is automatically pulled in by pip, you still have to explicitly add it to your INSTALLED_APPS in settings.py.

I spotted this because when I was uploading images, they weren't appearing in the clipboard, and when inspecting the response from the upload, there was an internal server error complaining that an easy_thumbnails table wasn't available.

tl;dr; check you added easy_thumbnails to your settings and did a migration / syncdb


Take a look in your urls.py. You should have the following code in it:

if settings.DEBUG:
    urlpatterns += patterns('', (
        r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}))

Cheers

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜