image problem

29 views
Skip to first unread message

Harjot Mann

unread,
Sep 17, 2012, 1:13:36 PM9/17/12
to django...@googlegroups.com
anyone  tel me how to display images on html links using django..........
what path should be given in settings.py file

damanpreet singh

unread,
Sep 18, 2012, 4:52:41 AM9/18/12
to django...@googlegroups.com
On Mon, Sep 17, 2012 at 10:43 PM, Harjot Mann <harjotm...@gmail.com> wrote:
> anyone tel me how to display images on html links using django..........
> what path should be given in settings.py file

In django, you have to keep your images in "/var/www" and give the
full "localhost address" in the html files you made.
for example, (Images in /var/www) -- /var/www/image.jpg
(then get the localhost address of the image ) --
http://localhost/image.jpg
(add this address in .html file where you need the
image) -- <img class="image aligntop"
src="http://localhost/image.jpg" width="430" height="155" alt="" />

You dont need to make any changes for that.


--
Damanpreet Singh
[TnP]: Training Consultant
[Blog]: http://damanpreet.co.cc/
[DailyDiary]: http://damanpreet26.blogspot.in/2012/05/daily-diary.html

Harjot Mann

unread,
Sep 18, 2012, 8:20:04 AM9/18/12
to django...@googlegroups.com
ok..thnks


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.


Reply all
Reply to author
Forward
0 new messages