mediagoblin-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GMG-Devel] PDF support


From: Sebastian Spaeth
Subject: Re: [GMG-Devel] PDF support
Date: Thu, 08 Nov 2012 21:27:14 +0100
User-agent: Kaiten Mail

Christopher Allan Webber <address@hidden> wrote:
>

>we would need to probably change this to something like:
>
>    <a href="{{ entry_url }}">
>      {% if entry.media_files.has_key('thumb') %}
>        <img src="{{ request.app.public_store.file_url(
>                       entry.media_files['thumb']) }}" />
>      {% else %}
>        <img src="{{ request.staticdirect(entry.thumb_fallback) }}" />
>      {% endif %}
>    </a>
>
>where we extended MediaEntry to have a thumb_fallback method that was
>able to check the media type's "default_thumb" attribute in the
>MEDIA_MANAGER.

Would it not be nicer to have a "get_thumb_URL()" function in the MediaEntry 
class to avoid putting all the complexity in the templates?

Spaetz


-- 
Sent from my tablet. Please excuse my brevity.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]