diff --git a/.gitignore b/.gitignore index 9ebc923..2416ab1 100755 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ forums/local_settings.py static/CACHE/* *.py[cod] robots.txt +cuss.csv +stopwords_English.csv # C extensions *.so diff --git a/static/website/js/custom.js b/static/website/js/custom.js index d60e1d5..f62cbbf 100755 --- a/static/website/js/custom.js +++ b/static/website/js/custom.js @@ -3,6 +3,7 @@ $(document).ready(function() { $tutorial = $("#id_tutorial"); $minute_range = $("#id_minute_range"); $second_range = $("#id_second_range"); + $title = $("#id_title") var tutorial = $tutorial.val(); var category = $category.val(); @@ -98,15 +99,16 @@ $(document).ready(function() { } }); - $second_range.change(function() { + $title.change(function() { $.ajax({ url: "/ajax-similar-questions/", type: "POST", data: { - category: $category.val(), - tutorial: $tutorial.val(), - minute_range: $minute_range.val(), - second_range: $second_range.val() + category : $category.val(), + tutorial : $tutorial.val(), + minute_range : $minute_range.val(), + second_range : $second_range.val(), + title : $title.val(), }, dataType: "html", success: function(data) { diff --git a/static/website/templates/new-question.html b/static/website/templates/new-question.html index 2be36a3..79545ed 100755 --- a/static/website/templates/new-question.html +++ b/static/website/templates/new-question.html @@ -31,23 +31,42 @@

{% render_field form.second_range class+="form-control" disabled="disabled" %}
-
- - - 0 similar questions - - -
+
+ + {% if spam %} + + {% endif %}

Please enter your question details.

+
- +
+
{% render_field form.title class+="form-control" %}
+ + +
{% render_field form.body class+="form-control" %} @@ -59,7 +78,7 @@

-