diff options
author | Joar Wandborg <git@wandborg.com> | 2011-07-03 05:46:00 +0200 |
---|---|---|
committer | Joar Wandborg <git@wandborg.com> | 2011-07-03 05:46:00 +0200 |
commit | 2c9e635ae2ecbef0649df78636503be357f16a7f (patch) | |
tree | b3f3c80c29c434c89b0d43f02e708a3610d7e5c7 /mediagoblin/templates | |
parent | 93214d8e0287150aef3f4370237303bc73ec448c (diff) | |
download | mediagoblin-2c9e635ae2ecbef0649df78636503be357f16a7f.tar.lz mediagoblin-2c9e635ae2ecbef0649df78636503be357f16a7f.tar.xz mediagoblin-2c9e635ae2ecbef0649df78636503be357f16a7f.zip |
Feature #400 - Resize images to fit on page - Additions
* `migrations.py`
* Removed empty line
* Added empty line
* `models.py`
* Added `MediaEntry.get_display_media()` helper function
* `process_media.__init__.py`
* Updated `process_media_initial()`
* Renamed `main` => `original`.
* Added condition to `medium`, it's only created if the original
dimensions exceed the MEDIUM_SIZE dimensions.
* `media.html`
* The image tag is now populated by `MediaEntry.get_display_media()`
* `util.py`
* Added `DISPLAY_IMAGE_FETCHING_ORDER`, used by `MediaEntry.get_display_media()`
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r-- | mediagoblin/templates/mediagoblin/user_pages/media.html | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index e16f1e00..56d79662 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -26,13 +26,8 @@ <h1> {{media.title}} </h1> - {% if media.media_files.medium %} - <img class="media_image" src="{{ request.app.public_store.file_url( - media.media_files.medium) }}" /> - {% else %} - <img class="media_image" src="{{ request.app.public_store.file_url( - media.media_files.main) }}" /> - {% endif %} + <img class="media_image" src="{{ request.app.public_store.file_url( + media.get_display_media(media.media_files)) }}" /> <p> Uploaded on {{ "%4d-%02d-%02d"|format(media.created.year, |