Mercurial > agora-palash
comparison templates/snippet/snippet_details.djhtml @ 207:d534881629ff
Updated snippet's template and views files to fix rating code collision which prevented posting new snippets.
Updated snippet's models file so that now secret id of each snippet will be unique. It also means that the no two or more than two snippets will have same secret id.
author | Ahsan Ali Shahid <ahsan.ali.shahid@gmail.com> |
---|---|
date | Mon, 19 Aug 2013 20:30:19 +0500 |
parents | c13a3ab314ab |
children | a22259c9862e |
comparison
equal
deleted
inserted
replaced
206:1f1e867cb37f | 207:d534881629ff |
---|---|
89 <div id = "radio_votes"> | 89 <div id = "radio_votes"> |
90 | 90 |
91 <form action = "rating/process/" method = "POST" id="rate_form"> | 91 <form action = "rating/process/" method = "POST" id="rate_form"> |
92 {% csrf_token%} | 92 {% csrf_token%} |
93 <h3 id ="rate_label">Rate this Snippet:</h3> | 93 <h3 id ="rate_label">Rate this Snippet:</h3> |
94 {{ snippet_form.Rate }} | 94 <ul> |
95 <li><label for="id_Rate_0"><input name="Rate" onclick="document.getElementById('rate_form').submit();" type="radio" class="rate_radio" value="1" id="id_Rate_0"> 1</label></li> | |
96 <li><label for="id_Rate_1"><input name="Rate" onclick="document.getElementById('rate_form').submit();" type="radio" class="rate_radio" value="2" id="id_Rate_1"> 2</label></li> | |
97 <li><label for="id_Rate_2"><input name="Rate" onclick="document.getElementById('rate_form').submit();" type="radio" class="rate_radio" value="3" id="id_Rate_2"> 3</label></li> | |
98 <li><label for="id_Rate_3"><input name="Rate" onclick="document.getElementById('rate_form').submit();" type="radio" class="rate_radio" value="4" id="id_Rate_3"> 4</label></li> | |
99 <li><label for="id_Rate_4"><input name="Rate" onclick="document.getElementById('rate_form').submit();" type="radio" class="rate_radio" value="5" id="id_Rate_4"> 5</label></li> | |
100 </ul> | |
95 <input type="hidden" name="next" value="{{ request.get_full_path }}" /> | 101 <input type="hidden" name="next" value="{{ request.get_full_path }}" /> |
96 </form> | 102 </form> |
97 </div> | 103 </div> |
98 <br/> | 104 <br/> |
99 <h2> Comments for this snippet: </h2>{% with snippet as object %}{% include "comments/rawcomment.html" %}{% endwith %}. | 105 <h2> Comments for this snippet: </h2>{% with snippet as object %}{% include "comments/rawcomment.html" %}{% endwith %}. |