Displaying images using using django page cms(Gerbi) image placeholder tag
Images do not display correctly. Also during the image upload in the admin area an extension of many numerical characters are added to the end of the filename. This is strange.
The image folder and image exists however the image doesn't display.
Could somebody please be kind enough to point me in the correct direction. Thanks
Template
{% imageplaceholder body-image as imgsrc %}
{% if imgsrc %}
<img src="{{ MEDIA_URL }}{{ imgsrc }}" alt="" />
{% endif %}
Error
GET /media/upload/page_7/body-image-1305027410.38.jpg
Why 1305027410.38.jpg ??? this h开发者_JAVA技巧appens to every image. How do I fix this?
By serving media/user uploaded files correctly. Staticfiles in 1.3 doesn't do this for you. It only serves non user uploaded files.
similar to how staticfiles were served before django 1.3
http://docs.djangoproject.com/en/dev/howto/static-files/
精彩评论