Re: Loop over a form's choices (radio button) and render it

2010-08-24 Thread pravasi
If you have a function as below in the SelectForm class you can get a iterable renderer for the radio button field.I am not very sure about whether you have a initial value or value in your situation. def get_selectfield_renderer(self): field = self.fields['selectfield']

Re: Loop over a form's choices (radio button) and render it

2010-08-23 Thread Bill Freeman
Andreas, I'll give it a try, but it won't be soon. Other projects are hot. Bill On Sun, Aug 22, 2010 at 9:07 AM, Andreas Pfrengle wrote: > Hello Bill, > > thanks for the code. It took half the weekend, but finally I built > upon this to get a radiobutton-iterator. This was a bit more > complic

Re: Loop over a form's choices (radio button) and render it

2010-08-22 Thread Andreas Pfrengle
Hello Bill, thanks for the code. It took half the weekend, but finally I built upon this to get a radiobutton-iterator. This was a bit more complicated, since the RadioInput widget has no own render-method, so I needed to introduce a helper class that derives from RadioInput. I've put the code her

Re: Loop over a form's choices (radio button) and render it

2010-08-16 Thread Bill Freeman
Ok. I have permission from my boss, and have cleaned it up a bit. See: http://djangosnippets.org/snippets/2151/ Bill On Sat, Aug 14, 2010 at 7:25 AM, Andreas Pfrengle wrote: > Hello Bill, > > thanks for your answer. However, I've never written a template filter > yet. Would you present the co

Re: Loop over a form's choices (radio button) and render it

2010-08-14 Thread Andreas Pfrengle
Hello Bill, thanks for your answer. However, I've never written a template filter yet. Would you present the code of your checkboxiterator? Is there sth. on djangosnippets? Andreas -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to thi

Re: Loop over a form's choices (radio button) and render it

2010-08-11 Thread Bill Freeman
Non-trivial. I would up writing a template filter to do this. You have to use undocumented, I believe, interfaces. I called my filter checkboxiterator, so usage looks something like: {% for pseudocheckbox in some_multi_select_field|checkboxiterator %} It iterates over a set of instances of a

Re: Loop over a form's choices (radio button) and render it

2010-08-11 Thread Andreas Pfrengle
Just to push it up again... any ideas? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com.

Re: Loop over a form's choices (radio button) and render it

2010-08-07 Thread Andreas Pfrengle
Thinking about it, instead of the radio button it would be even better if I could select just the whole datarow. But I have no idea how to do it :-? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us..