From f9a430dfb613a45bde80cbe4ce366c9216cb16f5 Mon Sep 17 00:00:00 2001 From: Sanj Date: Tue, 4 Oct 2011 01:18:53 +0530 Subject: [PATCH] requirements, js --- requirements.txt | 1 + trubox/static/js/home.js | 9 +++++++++ trubox/templates/base.html | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 8cab98c..883b1d0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ -e bzr+http://code.0xdb.org/python-ox/#egg=python-ox django_extensions South +pYsearch diff --git a/trubox/static/js/home.js b/trubox/static/js/home.js index e69de29..00b7fa8 100644 --- a/trubox/static/js/home.js +++ b/trubox/static/js/home.js @@ -0,0 +1,9 @@ +$(function() { + $('#searchForm').submit(function(e) { + e.preventDefault(); + var q = $('#search').val(); + $.getJSON("/search/", {'q': q}, function(data) { + console.log(data); + }); + }); +}); diff --git a/trubox/templates/base.html b/trubox/templates/base.html index bb011ec..3ea9de1 100644 --- a/trubox/templates/base.html +++ b/trubox/templates/base.html @@ -22,7 +22,7 @@
-
+