Re: CheckBoxInput widget: check_test

2010-08-06 Thread Bill Freeman
It's always a hazzard to simplify the code because you can make errors simplifying, causing folks to spend time trying to figure out the wrong stuff. If the code is big it may be appropriate to excerpt, but other than sanitizing out sensitive information, it's best not to edit the stuff you do pas

Re: CheckBoxInput widget: check_test

2010-08-06 Thread lingrlongr
@Bill Thanks. I just stumbled across that widget. I know models.Model weren't there, I was trying to simplify thinking we'd all know they were there. I guess, never assume ;) Looks like I don't even have to worry about that check_test field after all. Using initial worked perfectly. def get_

Re: CheckBoxInput widget: check_test

2010-08-06 Thread Daniel Roseman
On Aug 6, 7:13 pm, lingrlongr wrote: > Having difficulty getting the check_test to work.  Can't find any > examples out there that help.  I'll probably have to give a little > background.  I simplified where able to... > > class Cat: >   name = CharField > > class Category: >   name = ForeignKey(C

Re: CheckBoxInput widget: check_test

2010-08-06 Thread Bill Freeman
There is a CheckBoxSelectMultiple widget in django.forms, suitable for use with a forms.ModelMultipeChoiceField, and probably with other stuff.Doesn't it do what you need? Or are you just reinventing the wheel. And, of course, your code as shown doesn't work because Cat and Category are not b

Re: CheckBoxInput widget: check_test

2010-08-06 Thread lingrlongr
Forgo the most important part. I want to be prompted with a checkboxes that show which categories are selected, as well as the ones that aren't. On Aug 6, 2:13 pm, lingrlongr wrote: > Having difficulty getting the check_test to work.  Can't find any > examples out there that help.  I'll probably