display LP 2017 videos and keynotes
authorAndrew Engelbrecht <sudoman@ninthfloor.org>
Tue, 28 Mar 2017 17:01:41 +0000 (13:01 -0400)
committerAndrew Engelbrecht <sudoman@ninthfloor.org>
Tue, 28 Mar 2017 17:01:41 +0000 (13:01 -0400)
mediagoblin_libreplanet/__init__.py
mediagoblin_libreplanet/templates/libreplanet/root.html

index 62c1d3d..5012258 100644 (file)
@@ -60,7 +60,6 @@ MAX_HOME_LP_ITEMS = 10
 # make tags lowercase and use dashes in place of spaces.
 # uppercase tags will be included by the lowercase form.
 FEATURED_TAG = "featured"
-LATEST_LP_VIDEO_TAG = "libreplanet-2016-video"
 
 
 _log = logging.getLogger(__name__)
@@ -90,7 +89,10 @@ def frontpage_view(request):
     images          = lp_media_for_type(request.db, u'mediagoblin.media_types.image', None, MAX_HOME_ALL_PHOTO_ITEMS)
     videos          = lp_media_for_type(request.db, u'mediagoblin.media_types.video', None, MAX_HOME_ALL_VIDEO_ITEMS)
 
-    lp2016_videos   = lp_media_for_type(request.db, u'mediagoblin.media_types.video', LATEST_LP_VIDEO_TAG, MAX_HOME_LP_ITEMS)
+    lp2017_keynotes = lp_media_for_type(request.db, u'mediagoblin.media_types.video', "libreplanet-2017-keynote", MAX_HOME_LP_ITEMS)
+    lp2017_videos   = lp_media_for_type(request.db, u'mediagoblin.media_types.video', "libreplanet-2017-video", MAX_HOME_LP_ITEMS)
+
+    lp2016_videos   = lp_media_for_type(request.db, u'mediagoblin.media_types.video', "libreplanet-2016-video", MAX_HOME_LP_ITEMS)
 
     featured_images = lp_media_for_type(request.db, u'mediagoblin.media_types.image', FEATURED_TAG, MAX_HOME_FEATURED_ITEMS)
     featured_videos = lp_media_for_type(request.db, u'mediagoblin.media_types.video', FEATURED_TAG, MAX_HOME_FEATURED_ITEMS)
index 3d6ef50..7004b84 100644 (file)
 </p>
   <div class="clear"></div>
 
+  <h2>{% trans %}LibrePlanet 2017 Keynotes{% endtrans %}</h2>
+  {{ media_grid(request, lp2017_keynotes) }}
+  <div class="clear"></div>
+
+  <h2>{% trans %}LibrePlanet 2017 Videos{% endtrans %}</h2>
+  {{ media_grid(request, lp2017_videos) }}
+  <div class="clear"></div>
+  <p>
+    <a href="/u/libreplanet/tag/libreplanet-2017-video/">View all LibrePlanet 2017 videos</a>
+  </p>
+
   <h2>{% trans %}LibrePlanet 2016 Videos{% endtrans %}</h2>
   {{ media_grid(request, lp2016_videos) }}
   <div class="clear"></div>