Hi Josh, Thanks for your response. I am sorry but the code is ok that can find the image. Issue actually with the css that I have solved.
So, sorry for the noise. Thanks. Wesley 在 2014年5月13日星期二UTC+8下午9时45分02秒,Josh Cartmell写道: > > What ends up as the src of the img tag? > > > On Tue, May 13, 2014 at 6:10 AM, Wesley <[email protected] <javascript:>>wrote: > >> Hi guys, >> I hit a proble when referring filefield in template. >> Here is model: >> class Slide(Orderable): >> ''' >> A slide in a slider connected to a HomePage >> ''' >> homepage = models.ForeignKey(HomePage, related_name="slides") >> image = FileField(verbose_name=_("Image"), >> upload_to=upload_to("mytheme.Slide.image", "slider"), >> format="Image", max_length=255, null=True, blank=True) >> >> Here is template snippet: >> {% for slide in page.homepage.slides.all %} >> <div class="item"> >> <!-- img class="img-responsive img-full" >> src="{{ slide.get_image_url }}" alt="" --> >> <img class="img-responsive img-full" >> src="{{ MEDIA_URL }}{% thumbnail slide.image 1920 690 %}" alt=""> >> </div> >> {% endfor %} >> >> It cannot find the src image, why? how to fix? >> >> Thanks. >> Wesley >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Mezzanine Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
