Hi,

am using django 1.10 version. am unable to display images in web.

my app name -- polls

I created templates directory and i put my *home.html* over there 
*<html>*
*<body>*
*<img src="static/images/logo.jpg" alt="My Logo"/>*
*</div>*
*</body>*
*</html>*

I created static folder and i put my image *logo.jpg* over there

In my views file I imported home.html :

*from django.shortcuts import render_to_response*
*from django.http import HttpResponse*

*# Create your views here.*
*def index(request):*
*    return render_to_response('home.html')*

settings.py :

*STATIC_URL = '/static/'*

I am able to display text but not images.


Can any one please help me in this.

Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e3703e83-01d4-4412-9227-c82147262571%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to