google-code-export / django-photologue

Automatically exported from code.google.com/p/django-photologue
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

next_in_gallery and previous_in_gallery template tags should be inclusion tags #115

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The next_in_gallery and previous_in_gallery template tags feel like they
should be inclusion tags since they generate HTML.  Instead, they're simple
tags that have hard coded html strings in them.  This makes it impossible
to override the html behaviour from the project level.

This is an issue because they are both hard coded to use the thumbnail url
and I need to use a different size.  At this point, my only option is to
re-code the tags by hand in my own project.

Original issue reported on code.google.com by ZamTools on 17 May 2009 at 7:33

GoogleCodeExporter commented 9 years ago
this patch adds some templatetags to photologue_tags.py
it allows you to create you own buttons to next and previous photos
It also give acces to some exif informations

Example:

{% load photologue_tags %}

{% for gallery in photo.public_galleries %}

    {% get_photo_infos photo gallery as my_photo %}

    {% if my_photo.has_next %}
        <p>
        <a href="{{ my_photo.next_in_gallery_URL }}" class="richard"><img src={{ 
my_photo.next_in_gallery_thumbnail }} title={{ my_photo.next_in_gallery_title 
}}</a>
        </p>
    {% endif %}
        <ul class="gallery_exif">
            <li>{{ object.date_taken|date:"d/m/y H:i" }}</li>
            <li>{{ my_photo.exif.camera }}</li>
            <li>S: {{ my_photo.exif.speed }}</li>
            <li>f: {{ my_photo.exif.aperture }}</li>
            <li>mn: {{ my_photo.exif.focallength }}</li>
            <li>mn(eq35): {{ exif_focallength35mn object }}</li>
            <li>ISO: {{ my_photo.exif.ISO }}</li>
{% endfor %}

Original comment by richard.moch@gmail.com on 22 Jun 2009 at 5:44

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by justin.d...@gmail.com on 22 Jul 2009 at 12:25

GoogleCodeExporter commented 9 years ago
Fixed in r396.

Original comment by justin.d...@gmail.com on 23 Jul 2009 at 5:59