Accessing Medialibrary File directly

21 views
Skip to first unread message

Tobias Paepke

unread,
Jan 26, 2012, 6:31:58 AM1/26/12
to django-...@googlegroups.com
Hi guys,

I want to access mediafiles of a Page eg. Images and render thumbnails
of it. In elephantblog i see some ideas to access the files like the
blog_widget templatetag library with its "get_frontpage" tag. But I
can't pipe it through the feincms_thumbnail function.

Has anyone an idea?

tobias

Tobias Paepke

unread,
Jan 26, 2012, 9:41:31 AM1/26/12
to Django FeinCMS
well. solved:

for that elephantblog get_frontpage tag:

{% get_frontpage %}
{% for entry in entries %}
{% for content in entry.content.main %}
<img src="{{ content.mediafile.file|
thumbnail:"100x100"}}">
        {% endfor %}
  {% endfor %}

for a feincms page accordingly:
{% for content in feincms_page.content.main %}
<img src="{{ content.mediafile.file|
thumbnail:"100x100"}}">
    {% endfor %}
Reply all
Reply to author
Forward
0 new messages