Re: customization of the form

2009-04-22 Thread Tom Evans
On Wed, 2009-04-22 at 04:42 -0700, Konstantin S wrote: > On Apr 22, 1:51 pm, Tom Evans wrote: > > On Tue, 2009-04-21 at 21:20 +0400, Konstantin S wrote: > > > Hello! > > > > > In my model I have dynamically generated checkbox fields that look like > > > this: > > > > > boxes = forms.ModelMultipl

Re: customization of the form

2009-04-22 Thread Konstantin S
On Apr 22, 3:31 pm, zayatzz wrote: > This css should do it: > > ul {list-style-image:none;list-style-position:outside;list-style- > type:none; float:left} > ul li {width:50%;display:block;float:left} > > What this does, is that it gives every list element 50% of available > width (if you want 3 c

Re: customization of the form

2009-04-22 Thread Konstantin S
On Apr 22, 1:51 pm, Tom Evans wrote: > On Tue, 2009-04-21 at 21:20 +0400, Konstantin S wrote: > > Hello! > > > In my model I have dynamically generated checkbox fields that look like > > this: > > > boxes = forms.ModelMultipleChoiceField(queryset=Box.objects.all(), > > widget=forms.CheckboxSelec

Re: customization of the form

2009-04-22 Thread zayatzz
This css should do it: ul {list-style-image:none;list-style-position:outside;list-style- type:none; float:left} ul li {width:50%;display:block;float:left} What this does, is that it gives every list element 50% of available width (if you want 3 columns then put it to 30%), display block is actua

Re: customization of the form

2009-04-22 Thread Tom Evans
On Tue, 2009-04-21 at 21:20 +0400, Konstantin S wrote: > Hello! > > In my model I have dynamically generated checkbox fields that look like this: > > boxes = forms.ModelMultipleChoiceField(queryset=Box.objects.all(), > widget=forms.CheckboxSelectMultiple) > > The problem is that in the web-inte

Re: customization of the form

2009-04-22 Thread Konstantin S
On Apr 22, 11:33 am, Konstantin S wrote: > I can't iterate through individual and mark them in some way or > split this single into two lists. Just to be clear: I can't do it because it's generated as a single not iterable entity. --~--~-~--~~~---~--~~ You recei

Re: customization of the form

2009-04-22 Thread Konstantin S
On Apr 22, 9:29 am, zayatzz wrote: > I wish i could see the html output of your program. But you have to > use either divs or ul&li elemnts to wrap that list and make it look > nice in template. > > But i think the problem is that your widget output is just a list of > checkboxes, that you cant i

Re: customization of the form

2009-04-21 Thread zayatzz
I wish i could see the html output of your program. But you have to use either divs or ul&li elemnts to wrap that list and make it look nice in template. But i think the problem is that your widget output is just a list of checkboxes, that you cant iterate in a template, so wrapping them is impos

customization of the form

2009-04-21 Thread Konstantin S
Hello! In my model I have dynamically generated checkbox fields that look like this: boxes = forms.ModelMultipleChoiceField(queryset=Box.objects.all(), widget=forms.CheckboxSelectMultiple) The problem is that in the web-interface I've got a long flat list of checkboxes and it doesn't look very