I have a view and template called index.html.
I have a image which is broken form.I saw django docs,which was n't clear to me.
How do,i make my image to appear.I m asking ,while development.image is in开发者_JAVA百科 ,this URL /home/logic/quote/hummingbird.gif'
Your question is not really clear but I suspect that you are having trouble serving static files using the Django built-in web server. Have a look at the following StackOverflow Questions:
- Django and Serving Static Files
- How does Django serve media files?
- Django: how do you serve media / stylesheets and link to them within templates
what about writing an inclusion tag that makes something simmilar to:
if settings.debug=True:
return localimage
else:
return serverimage
精彩评论