--- a/src/hdalab/views/profile.py Fri Jan 30 12:14:38 2015 +0100
+++ b/src/hdalab/views/profile.py Mon Feb 02 12:40:31 2015 +0100
@@ -394,13 +394,24 @@
country_list = [c for c in countries if c!=""]
all_tags = Tag.objects.filter( Q(label__in=label_list) | Q(dbpedia_uri__in=country_list) ).select_related("dbpedia_fields", "category")
+ # Get datasheets from ajax filter search
+ temp_fitler = filter_generic(lang, period, ",".join(label_list), ",".join(country_list), content_count=18)
+ filter_output = json.loads(temp_fitler)
+ filter_output_to_bin = json.loads(temp_fitler)
- # Get datasheets from ajax filter search
- filter_output = filter_generic(lang, period, ",".join(label_list), ",".join(country_list), content_count=10)
- filter_output = json.loads(filter_output)
- #logger.debug("COUCOU")
- #logger.debug(json.dumps(filter_output, indent=2))
- #return HttpResponse(json.dumps(filter_output, indent=2), content_type="application/json")
+ #Keep only the 8 first ressources to create the graph
+ #the 10 next are sent to the bins
+ for i in range(len(filter_output["contents"])):
+ if (i < 8):
+ del filter_output_to_bin["contents"][0]
+ else:
+ del filter_output["contents"][8]
+
+ content["bins"] = {
+ "type": "ResourceList",
+ "title": "Plus de Ressources",
+ "list": filter_output_to_bin["contents"]
+ }
# Prepare other tags
related_tags = []