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
This commit is contained in:
Jessica Tallon
2015-09-17 13:47:56 +02:00
parent 80ba8ad1d1
commit 0f3bf8d4b1
48 changed files with 437 additions and 250 deletions

View File

@@ -34,7 +34,7 @@ def trigger_notification(comment, media_entry, request):
if not subscription.notify:
continue
if comment.get_author == subscription.user:
if comment.get_actor == subscription.user:
continue
cn = CommentNotification(

View File

@@ -32,11 +32,11 @@ def generate_comment_message(user, comment, media, request):
comment_url = request.urlgen(
'mediagoblin.user_pages.media_home.view_comment',
comment=comment.id,
user=media.get_uploader.username,
user=media.get_actor.username,
media=media.slug_or_id,
qualified=True) + '#comment'
comment_author = comment.get_author.username
comment_author = comment.get_actor.username
rendered_email = render_template(
request, 'mediagoblin/user_pages/comment_email.txt',