|
|
@ -27,7 +27,7 @@ from mediagoblin.decorators import uses_pagination, user_not_banned |
|
|
|
|
|
|
|
|
|
|
|
PLUGIN_DIR = os.path.dirname(__file__) |
|
|
|
PLUGIN_DIR = os.path.dirname(__file__) |
|
|
|
MAX_HOME_ITEMS = 20 |
|
|
|
MAX_HOME_ITEMS = 20 |
|
|
|
LP_TAG = 'libreplanet2014' |
|
|
|
LP_TAG = 'libreplanet2015' |
|
|
|
|
|
|
|
|
|
|
|
_log = logging.getLogger(__name__) |
|
|
|
_log = logging.getLogger(__name__) |
|
|
|
|
|
|
|
|
|
|
@ -40,7 +40,7 @@ def setup_plugin(): |
|
|
|
register_template_path(os.path.join(PLUGIN_DIR, 'templates')) |
|
|
|
register_template_path(os.path.join(PLUGIN_DIR, 'templates')) |
|
|
|
|
|
|
|
|
|
|
|
def lp_media_for_type(db, type): |
|
|
|
def lp_media_for_type(db, type): |
|
|
|
return media_entries_for_tag_slug(db, 'libreplanet2015').\ |
|
|
|
return media_entries_for_tag_slug(db, LP_TAG).\ |
|
|
|
filter(MediaEntry.media_type == type).\ |
|
|
|
filter(MediaEntry.media_type == type).\ |
|
|
|
order_by(MediaEntry.created.desc()).\ |
|
|
|
order_by(MediaEntry.created.desc()).\ |
|
|
|
limit(MAX_HOME_ITEMS) |
|
|
|
limit(MAX_HOME_ITEMS) |
|
|
|