richardbarran / django-photologue

A customizable plug-in photo gallery management application for the Django web framework.
BSD 3-Clause "New" or "Revised" License
675 stars 239 forks source link

Displaying Images uploaded in template #166

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hi, I have followed the instructions on how to install photologue. I am able to upload photos from my django admin. Only issue is after searching and trying different things, I still can't quite figure out how to display the pictures I uploaded in my templates. Are there special template tags required? Please it would be helpful if you could show me how to display images uploaded with photologue in my templates. Thank you.

richardbarran commented 7 years ago

Sorry - this is something that is not in the docs - it's forever on the "TODO" list. Take a look at the example templates - if you have a 'photo' instance as a template variable, then {{ photo.get_thumbnail_url }} will get the url of the thumbnail (photosize) called 'thumbnail'. Likewise, if you've defined a Photosize called 'display' then {{ photo.get_display_url }} will fetch it.

ghost commented 7 years ago

Thanks for your help here Richard, I have been able to solve it using the sample template you directed me to. Thank you.

On 28 December 2016 at 11:02, Richard Barran notifications@github.com wrote:

Sorry - this is something that is not in the docs - it's forever on the "TODO" list. Take a look at the example templates https://github.com/jdriscoll/django-photologue/blob/master/photologue/templates/photologue/photo_list.html#L16

  • if you have a 'photo' instance as a template variable, then {{ photo.get_thumbnail_url }} will get the url of the thumbnail (photosize) called 'thumbnail'. Likewise, if you've defined a Photosize called 'display' then {{ photo.get_display_url }} will fetch it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jdriscoll/django-photologue/issues/166#issuecomment-269454995, or mute the thread https://github.com/notifications/unsubscribe-auth/AT31JpWFmTgBDJfSDXHNF-WhPGXoRS85ks5rMjOagaJpZM4LWuPQ .