On Apr 22, 1:51 pm, Tom Evans <[email protected]> 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.CheckboxSelectMultiple) > > > The problem is that in the web-interface I've got a long flat list of > > checkboxes and it doesn't look very nice from a design point of view. > > What I want is to split it into two or more columns, but I am not a > > web developer and my knowledge in html and css is very limited. I'd > > try to find a solution for this problem if I were given some hints > > where to start. Please give me such hints. > > Write your own widget class to output the required inputs in the manner > you want. Check out how CheckboxSelectMultiple.render() is implemented > in django/forms/widgets.py >
Thanks, Tom! Your advise really seems to be a solution for my problem. BTW is there any official documentation for writing custom widgets ? Couldn't find any :( --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

