aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/models.py
diff options
context:
space:
mode:
authorJessica Tallon <xray7224@googlemail.com>2013-08-14 19:58:01 +0100
committerJessica Tallon <jessica@megworld.co.uk>2014-07-22 23:13:14 +0100
commit5b014a08661f718bd92971e71d173a0ea4b62c40 (patch)
tree9ec2b3793f8103b4f8bbc169aa802f77a19dfde7 /mediagoblin/db/models.py
parentc8bd2542d7b8face6033884fccfb898be1d12989 (diff)
downloadmediagoblin-5b014a08661f718bd92971e71d173a0ea4b62c40.tar.lz
mediagoblin-5b014a08661f718bd92971e71d173a0ea4b62c40.tar.xz
mediagoblin-5b014a08661f718bd92971e71d173a0ea4b62c40.zip
Add image URL's (thumb & full)
Diffstat (limited to 'mediagoblin/db/models.py')
-rw-r--r--mediagoblin/db/models.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py
index 281c09d9..925f0d24 100644
--- a/mediagoblin/db/models.py
+++ b/mediagoblin/db/models.py
@@ -455,6 +455,12 @@ class MediaEntry(Base, MediaEntryMixin):
"displayName": self.title,
"objectType": self.objectType,
"url": url,
+ "image": {
+ "url": request.host_url + self.thumb_url[1:],
+ },
+ "fullImage":{
+ "url": request.host_url + self.original_url[1:],
+ }
}
if show_comments: