From abc5a6f0610c325f1e0d89f6ee780580984d637d Mon Sep 17 00:00:00 2001 From: andrewlalis Date: Tue, 25 Sep 2018 14:26:44 +0200 Subject: [PATCH] Added handlebars. --- frontpage/index2.html | 5 +++-- frontpage/js/load_reviews.js | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/frontpage/index2.html b/frontpage/index2.html index 6071c72..0b6a5f5 100644 --- a/frontpage/index2.html +++ b/frontpage/index2.html @@ -262,10 +262,11 @@ - + + - + diff --git a/frontpage/js/load_reviews.js b/frontpage/js/load_reviews.js index e69de29..3d10447 100644 --- a/frontpage/js/load_reviews.js +++ b/frontpage/js/load_reviews.js @@ -0,0 +1,18 @@ +var $ = jQuery; + +function displayReviews(reviews) { + +} + +function loadReviews () { + $.ajax({ + url: "http://localhost:8000/api/postings/", + method: "GET" + }).done(function (response) { + displayReviews(response); + }).fail(function (response) { + console.log(response); + }) +} + +loadReviews(); \ No newline at end of file