--- a/src/hdalab/views/profile.py Mon Sep 08 16:16:14 2014 +0200
+++ b/src/hdalab/views/profile.py Thu Sep 11 10:03:07 2014 +0200
@@ -166,6 +166,9 @@
u"Localisation": static("hdalab/img/category_localisation.png"),
u"Ecole/Mouvement": static("hdalab/img/category_movement.png")}
+ # category image dict
+ shapes = { "tag1": "polygon", "notice": "rectangle", "tag2": "star" }
+
# Renkan Project ID
project_id = unicode(uuid.uuid1())
@@ -192,8 +195,9 @@
"image": "http://www.histoiredesarts.culture.fr/images/pf/" + notice.hda_id + ".jpg",
"size": 0,
"project_id": project_id,
- "color": None,
- #"created_by": "roster_user-84fe909f-ba37-48e6-a25f-9d2f129a95b7"
+ "color": "#FF0033",
+ #"created_by": "roster_user-84fe909f-ba37-48e6-a25f-9d2f129a95b7",
+ "shape": shapes["notice"]
})
# Get translated labels
@@ -217,8 +221,9 @@
"image": img_url,
"size": 0,
"project_id": project_id,
- "color": None,
- #"created_by": "roster_user-84fe909f-ba37-48e6-a25f-9d2f129a95b7"
+ "color": "#00FF33",
+ #"created_by": "roster_user-84fe909f-ba37-48e6-a25f-9d2f129a95b7",
+ "shape": shapes["tag2"]
})
response = json.dumps(content)
@@ -267,8 +272,9 @@
"image": "http://www.histoiredesarts.culture.fr/images/pf/" + n.hda_id + ".jpg",
"size": 0,
"project_id": project_id,
- "color": None,
- #"created_by": "roster_user-84fe909f-ba37-48e6-a25f-9d2f129a95b7"
+ "color": "#FF0033",
+ #"created_by": "roster_user-84fe909f-ba37-48e6-a25f-9d2f129a95b7",
+ "shape": shapes["notice"]
})
# Place tags
@@ -285,8 +291,9 @@
"image": img_url,
"size": 0,
"project_id": project_id,
- "color": None,
- #"created_by": "roster_user-84fe909f-ba37-48e6-a25f-9d2f129a95b7"
+ "color": "#00FF33",
+ #"created_by": "roster_user-84fe909f-ba37-48e6-a25f-9d2f129a95b7",
+ "shape": shapes["tag2"]
})
# Place edges
@@ -382,7 +389,8 @@
"size": 0,
"project_id": project_id,
"color": None,
- #"created_by": "roster_user-84fe909f-ba37-48e6-a25f-9d2f129a95b7"
+ #"created_by": "roster_user-84fe909f-ba37-48e6-a25f-9d2f129a95b7",
+ "shape": shapes["tag1"]
})
for c in filter_output["contents"]:
@@ -396,7 +404,8 @@
"size": 0,
"project_id": project_id,
"color": "#FF0033",
- #"created_by": "roster_user-84fe909f-ba37-48e6-a25f-9d2f129a95b7"
+ #"created_by": "roster_user-84fe909f-ba37-48e6-a25f-9d2f129a95b7",
+ "shape": shapes["notice"]
})
for t in related_tags:
@@ -410,7 +419,8 @@
"size": 0,
"project_id": project_id,
"color": "#00FF33",
- #"created_by": "roster_user-84fe909f-ba37-48e6-a25f-9d2f129a95b7"
+ #"created_by": "roster_user-84fe909f-ba37-48e6-a25f-9d2f129a95b7",
+ "shape": shapes["tag2"]
})
for c_id in related_tags_dict: