Re: For loop problem in template..Is this correct

2011-08-16 Thread victorkendy
Hi The for tag iterates over the elements of the list you are using so your code should be $(function() { var data = []; var i = something(); {% for x in content %} data[i] = { roll_no: {{x.roll_no}},

Re: TemplateSyntaxError at /admin/

2011-01-07 Thread victorkendy
hi there hank23 to fix the problem you just need to send the queryset parameter to the constructor of the ModelChoiceField pollquestions = forms.ModelChoiceField(queryset=SomeModel, ...other stuff...) works but pollquestions = forms.ModelChoiceField(...other stuff without queryset...) raises the