Merge remote branch 'remotes/jwandborg/feature_362-simple_comments-acts_on_feedback'
Conflicts: mediagoblin/templates/mediagoblin/user_pages/media.html
This commit is contained in:
@@ -23,7 +23,6 @@ from mediagoblin.auth import lib as auth_lib
|
||||
from mediagoblin import mg_globals
|
||||
from mediagoblin.db import migrations
|
||||
from mediagoblin.db.util import DESCENDING, ObjectId
|
||||
from mediagoblin.util import Pagination
|
||||
|
||||
###################
|
||||
# Custom validators
|
||||
@@ -109,24 +108,13 @@ class MediaEntry(Document):
|
||||
|
||||
migration_handler = migrations.MediaEntryMigration
|
||||
|
||||
def get_comments(self):
|
||||
return self.db.MediaComment.find({
|
||||
'media_entry': self['_id']}).sort('created', DESCENDING)
|
||||
|
||||
def main_mediafile(self):
|
||||
pass
|
||||
|
||||
def get_comments(self, page):
|
||||
cursor = self.db.MediaComment.find({
|
||||
'media_entry': self['_id']}).sort('created', DESCENDING)
|
||||
|
||||
pagination = Pagination(page, cursor)
|
||||
comments = pagination()
|
||||
|
||||
data = list()
|
||||
for comment in comments:
|
||||
comment['author'] = self.db.User.find_one({
|
||||
'_id': comment['author']})
|
||||
data.append(comment)
|
||||
|
||||
return (data, pagination)
|
||||
|
||||
|
||||
def generate_slug(self):
|
||||
self['slug'] = util.slugify(self['title'])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user