From fe6823fc7bc9f8e96afb916880af33e15c60d27b Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Wed, 15 Mar 2017 22:39:30 -0300 Subject: [PATCH] Adapt article_data return value to ModelTree standards --- kfet/views.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/kfet/views.py b/kfet/views.py index 4b356d43..93557157 100644 --- a/kfet/views.py +++ b/kfet/views.py @@ -1349,11 +1349,14 @@ def kpsul_articles_data(request): for article in articles: articlelist.append({ - 'id': article.id, - 'name': article.name, - 'price': article.price, - 'stock': article.stock, - 'category': { + 'type': 'article', + 'content': { + 'id': article.id, + 'name': article.name, + 'price': article.price, + 'stock': article.stock, + }, + 'parent': { 'id': article.category.id, 'name': article.category.name, }