Using Jssor with Django Media files -
i using django , jssor.
when use jssor slideshow transition, image disappear show if use images in 'media' folder. if use images in 'static' folder there won be.
could tell me why ?
django model:
class banner(models.model): image = models.filefield(upload_to='banner/%y_%m_%d') link = models.textfield()
django template:
... <div ...> {% banner in banners %} <div> <a href={% url banner.link %}> <img src="{{ banner.image.url }}"> </a> </div> {% endfor %} </div> ...
js:
var _slideshowtransitions = [{...some setting ...}] $slideshowoptions: { $class: $jssorslideshowrunner$, $transitions: _slideshowtransitions, $transitionsorder: 1, $showlink: true },
this problem of chrome. every time when new image element created in document dynamically, load image again event image loaded in same page. if resource not cache enabled client side, high performance consuming.
to enable cache client side, option of server, or controlled program.
so, browser caches resources come 'static' folder , not resources come 'media' folder.
Comments
Post a Comment