|
|
@ -21,9 +21,10 @@ from mediagoblin.tools.pagination import Pagination |
|
|
|
from mediagoblin.tools.response import render_to_response |
|
|
|
from mediagoblin.tools.response import render_to_response |
|
|
|
from mediagoblin.decorators import uses_pagination |
|
|
|
from mediagoblin.decorators import uses_pagination |
|
|
|
|
|
|
|
|
|
|
|
def type_listing(type, title, request, page): |
|
|
|
def type_listing(media_type, title, request, page): |
|
|
|
cursor = MediaEntry.query.\ |
|
|
|
cursor = MediaEntry.query.\ |
|
|
|
filter(MediaEntry.media_type == type).\ |
|
|
|
filter((MediaEntry.media_type == media_type) |
|
|
|
|
|
|
|
& (MediaEntry.state == u'processed')).\ |
|
|
|
order_by(MediaEntry.created.desc()) |
|
|
|
order_by(MediaEntry.created.desc()) |
|
|
|
|
|
|
|
|
|
|
|
pagination = Pagination(page, cursor) |
|
|
|
pagination = Pagination(page, cursor) |
|
|
|