Re: CheckboxSelectMultiple under modelform

2008-04-06 Thread Iamnewbie
? Thanks. Joe On 4月6日, 上午12时34分, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sat, 2008-04-05 at 07:32 -0700, Iamnewbie wrote: > > I want to use CheckboxSelectMultiple (checkbox) under modelform > > instead of default ModelMultipleChoiceField settings. > > > my cod

CheckboxSelectMultiple under modelform

2008-04-05 Thread Iamnewbie
I want to use CheckboxSelectMultiple (checkbox) under modelform instead of default ModelMultipleChoiceField settings. my codes are as follows: class Form(ModelForm): def __init__(self, *args, **kwargs): super(Form, self).__init__(*args, **kwargs)

how to show customized label on html page under modelforms?

2008-04-03 Thread Iamnewbie
I am using modelforms instead of newforms. however, I found I have no place to use my customized label for each field. newforms offers forms.ChoiceField(label='MyOwnLabel') but I can not do it under modelforms, anyone has figured out how to do it? I searched djangoproject, nothing found about

Re: question on ModelMultipleChoiceField

2008-03-31 Thread Iamnewbie
I forgot attaching my related codes in views: if id is None: form = PostForm() else: post = get_object_or_404(Post, pk=id) form = PostForm(post.__dict__) I'd appreciated any help. Thanks. --~--~-~--~~~---~--~~ You

question on ModelMultipleChoiceField

2008-03-31 Thread Iamnewbie
I have codes as follows: tags=forms.ModelMultipleChoiceField(queryset=Tags.objects.all(), widget=forms.CheckboxSelectMultiple) It is working for showing an empty form to the user to enter data. however, when I want to show an existing data (that stored in database) to the user to edit, the