diff apps/snippet/forms.py @ 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 499e5f47f278
children
line wrap: on
line diff
--- a/apps/snippet/forms.py	Fri Jul 19 22:54:18 2013 +0500
+++ b/apps/snippet/forms.py	Mon Aug 19 20:30:19 2013 +0500
@@ -35,8 +35,6 @@
     )
 
 
-    form_choices = ( (x,x) for x in range(1,6) )
-    Rate = forms.ChoiceField(form_choices,widget=forms.RadioSelect(attrs={'onclick' :"document.getElementById('rate_form').submit();","class":"rate_radio"}))
 
     def __init__(self, *args, **kwargs):
         request = kwargs.pop('request')