gregplaysguitar / djangocms2000

Flexible Django CMS with edit-in-place capability. Master branch is stable
http://gregbrown.co.nz/code/djangocms2000/
Other
8 stars 8 forks source link

CMS should gracefully handle missing images #4

Closed mattdw closed 12 years ago

mattdw commented 12 years ago

Currently, if I download a database dump from (say) the live server, import it, then try to runserver locally, I get a bunch of IOErrors:

IOError at / [Errno 2] No such file or directory: u'/media/uploads/2012_09/filename.png'

in any cmsimage tag:

{% cmsimage 'image' %}

sorl.thumbnail does provide DEBUG fallback functionality, where it can show a blank or placekitten or whatever.

It would be cool if instead of having to download (in this case) 300MB+ of images I don't actually care about, I could just run without them, and have the cms deal with it gracefully instead of erroring out every time.

It would be acceptable if this only happened on DEBUG=True, although perhaps it should happen anyway.

mattdw commented 12 years ago

(300MB is actually, now it has finished, 900MB. I don't have enough disk space to do that for every site.)

gregplaysguitar commented 12 years ago

Sounds eminently sane. Will investigate.

gregplaysguitar commented 12 years ago

One problem is that

{% cmsimage 'image' %}

won't know what size kitten to fetch - any thoughts? I guess it should just default to a small image.

gregplaysguitar commented 12 years ago

Fixed in 5bc7b96b5866dda36de5966744d2c1779fe217ca