Найти - Пользователи
Полная версия: Photolog
Начало » Django » Photolog
1 2
FishHook
SergeyMiracle
Разобрался и с tumbnails
Ну и слава богу
SergeyMiracle
Ну вывод всех я сделал, а вывод фотографий галереи к конкретной статье не могу Модель Выше описана, пробую в шаблоне {{ products.album.photos }}, выводит - <django.db.models.fields.related.ManyRelatedManager object at 0x7f84ee665f50>… Подскажите плизик
Попровил вьющку
def productsfull(request):
	products = Product.objects.get(pk=1)
	photos = products.album.photos.all()[0]
	c = RequestContext(request, {'products': products, 'photos': photos})
	return render_to_response('product_full.html', c)

Стал выводить в теплейте так - <img src=“{{ photos.get_thumbnail_url }}” />, выводин 1 фото, добавляю цикл -
{% for photos in photos.all %}
  <a href="{{ MEDIA_URL }}{{ photos.image }}" ><img src="{{ photos.get_thumbnail_url }}" /></a>
 {% endfor %}
и ничего не отображает
SergeyMiracle
Решено
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB