I'd consider grabbing a list of GalleryImage objects and then using
the forloop.counter in the template as you iterate over each item.
Right now, it looks like you're only grabbing one item with IImage,
even though you're using filter(). I'd try it this way:
ImageList = GalleryImage.objects.filt
>
> lImage = GalleryImage.objects.filter(pk=pImageSerial).select_related()[0]
> lAlbumImages = GalleryImage.objects.filter(album__id = lImage.album.id)
> lImagesInAlbum = lAlbumImages.count()
> lImagePosition = None
> lPreviousImage = None
> lNextImage = None
> for lPos
Is there a better way that this?
lImage = GalleryImage.objects.filter(pk=pImageSerial).select_related()[0]
lAlbumImages = GalleryImage.objects.filter(album__id = lImage.album.id)
lImagesInAlbum = lAlbumImages.count()
lImagePosition = None
lPreviousImage = None
lNextImage =
Hi Folks,
If I have an image, and a list of images, how can I work out what position in
the list my image is so I can do a Image 4 of 24 type annotation?
lImage = GalleryImage.objects.filter(pk=pImageSerial).select_related()[0]
lAlbumImages = GalleryImage.objects.filter(album__id = lImage.album
4 matches
Mail list logo