diff options
author | Jessica Tallon <tsyesika@tsyesika.se> | 2015-09-17 13:47:56 +0200 |
---|---|---|
committer | Jessica Tallon <tsyesika@tsyesika.se> | 2015-10-07 14:40:44 +0200 |
commit | 0f3bf8d4b180ffd1907d1578e087522aad7d9158 (patch) | |
tree | 22279f7ff895047d1ec3c68bedb69a081cc0871a /mediagoblin/plugins/api/tools.py | |
parent | 80ba8ad1d1badb2f6330f25c540dc413e42e7d5c (diff) | |
download | mediagoblin-0f3bf8d4b180ffd1907d1578e087522aad7d9158.tar.lz mediagoblin-0f3bf8d4b180ffd1907d1578e087522aad7d9158.tar.xz mediagoblin-0f3bf8d4b180ffd1907d1578e087522aad7d9158.zip |
Collection changes and migration for federation
- Adds a "type" column to the Collection object and allows the
CollectionItem model to contain any object.
- Changes "items" to "num_items" as per TODO
- Renames "uploader", "creator" and "user" to a common "actor" in most places
Diffstat (limited to 'mediagoblin/plugins/api/tools.py')
-rw-r--r-- | mediagoblin/plugins/api/tools.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mediagoblin/plugins/api/tools.py b/mediagoblin/plugins/api/tools.py index 56256236..e406888e 100644 --- a/mediagoblin/plugins/api/tools.py +++ b/mediagoblin/plugins/api/tools.py @@ -62,12 +62,12 @@ def get_entry_serializable(entry, urlgen): to views. ''' return { - 'user': entry.get_uploader.username, - 'user_id': entry.get_uploader.id, - 'user_bio': entry.get_uploader.bio, - 'user_bio_html': entry.get_uploader.bio_html, + 'user': entry.get_actor.username, + 'user_id': entry.get_actor.id, + 'user_bio': entry.get_actor.bio, + 'user_bio_html': entry.get_actor.bio_html, 'user_permalink': urlgen('mediagoblin.user_pages.user_home', - user=entry.get_uploader.username, + user=entry.get_actor.username, qualified=True), 'id': entry.id, 'created': entry.created.isoformat(), |