> I study Django 1.0.2 on Djangobook
> Has read not all, but why that I can not find in this book the
> information anywhere how to be with Image? In the book the example
> with three models - Authors, Publisher and Books is resulted. And if I
> want still  the Image to books and that they were output in templates
> in the identical sizes???
> Prompt, please where to find such information

Your question isn't very clear but I'll try and help with what it  
sounds like you're asking: How to get images into your template? If so  
how about something like this:

In booksite/books/templates/pub.html

{% extends "base.html" %}

{% block title %}Книги{% endblock %}
{% block banner %}{% endblock %}
{% block content %}
{% for x in pub %}
    <h1>{{ x.name }}</h1>
    <p><img src="/images/pub/{{ x.id }}/thumbnail.jpg" alt= ""  
width="100" height="100" /> {{ x.address }}</p>
     <p>{{ x.website }}</p>
    <hr/>

{% endfor %}
{% endblock %}

Or you could use:

/images/pub/{{ x.id }}-thumbnail.jpg

Hope that helps?

Nick


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

Reply via email to