]> git.parisson.com Git - mezzo.git/commitdiff
[Home] : instagram ok
authorEmilie <zawadzki@ircam.fr>
Mon, 13 Feb 2017 15:44:08 +0000 (16:44 +0100)
committerEmilie <zawadzki@ircam.fr>
Mon, 13 Feb 2017 15:44:08 +0000 (16:44 +0100)
app/settings.py
app/templates/base.html
app/templates/includes/instafeed.html [deleted file]
app/templates/includes/instagram.html [new file with mode: 0644]
requirements.txt

index 3a84f1a01be025745843627e8ebec58eb7f12dc7..81d5d7c54f484fed0717bf6e22af140ad60ff116 100644 (file)
@@ -253,6 +253,8 @@ INSTALLED_APPS = [
     "organization.agenda",
     "organization.shop",
     "organization.job",
+    "sorl.thumbnail", # required for thumbnail support
+    "django_instagram",
 ]
 
 
index 57cd77b442e6ef077ff0cb22462b617c4db475c2..e5c9dbd64f38085a87c3ee6467b2136501b9eaa5 100644 (file)
@@ -77,6 +77,9 @@
                     <div>
                         INSTAGRAM HERE
                     </div>
+                    <div>
+                        {% include "includes/instagram.html" %}
+                    </div>
                 </div>
 
                 <div class="col-sm-6 col-sm-push-1 tac">
diff --git a/app/templates/includes/instafeed.html b/app/templates/includes/instafeed.html
deleted file mode 100644 (file)
index 0175a93..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-{% load i18n %}
-
-<div class="instagram-panel">
-    <h2 class="sidebar__title">Instagram</h2>
-        <div id="instafeed" class="row-box"></div>
-</div>
\ No newline at end of file
diff --git a/app/templates/includes/instagram.html b/app/templates/includes/instagram.html
new file mode 100644 (file)
index 0000000..c3ca074
--- /dev/null
@@ -0,0 +1,14 @@
+{% load instagram_client %}
+
+{% instagram_user_recent_media ircam_paris %}
+
+<div id="django_recent_media_wall">
+    {% for media in recent_media|slice:"3" %}
+        <div class="django_instagram_media_wall_item">
+            <a href="{{ media.display_src }}" target="_blank" title="{{ media.caption }}">
+                <img src="{{ media.thumbnail_src }}"/>
+                <span>{{ media.caption }}</span>
+            </a>
+        </div>
+    {% endfor %}
+</div>
index dcef1e3eb74b46d8695757ff4bba42e6fd6535e9..c8d813fc20306cc8e0a41dc34579222fdb48c826 100644 (file)
@@ -25,3 +25,4 @@ pandas==0.19.2
 xlwt==1.2.0
 DateTimeRange==0.2.8
 workalendar==1.0.0
+django-instagram==0.2.0a1