On Mon, May 23, 2011 at 11:27 AM, CH wrote:
> Django's documentation doesn't do a very thorough job of explaining
> how to use MultiValueField and MultiWidget. I've tried dissecting the
> one implementation [1] and haven't had good results. Would someone
> mind
Django's documentation doesn't do a very thorough job of explaining
how to use MultiValueField and MultiWidget. I've tried dissecting the
one implementation [1] and haven't had good results. Would someone
mind giving me a quick pointer in the right direction?
My attempt is her
I created a MultiWidget, SelectDateTimeWidget, to allow date/time
input with select boxes.
I created a MultiValueField, SelectDateTimeField, to use this widget.
I created a ModelForm, SubmissionForm, that uses this field.
Here are the source files:
* widgets.py: http://dpaste.com/hold/202352/
* fi
truggling to get MultiValueField and MultiWidget to work.
>
> > I have a CharField and ChoiceField in the MultiValueField class,
> > but I can't get the choices to show in the select tag.
>
> > Am I doing something wrong?
>
> > This is what I have so far:
>
widgets = (forms.Select(), forms.TextInput())
you make empty widget, just specify available choices there
On Wed, Nov 4, 2009 at 11:19 AM, psvent wrote:
>
> Hi!
>
> I am struggling to get MultiValueField and MultiWidget to work.
>
> I have a CharField and ChoiceField in t
Hi!
I am struggling to get MultiValueField and MultiWidget to work.
I have a CharField and ChoiceField in the MultiValueField class,
but I can't get the choices to show in the select tag.
Am I doing something wrong?
This is what I have so far:
class AutocompleteWidget(forms.MultiW
On Feb 19, 10:18 pm, "Justin Findlay" <[EMAIL PROTECTED]> wrote:
> On Jan 25, 1:16 pm, "canen" <[EMAIL PROTECTED]> wrote:
>
> > Answering my own question:
> Thanks for the example!
I created another, but it uses initial data, and an object
representing the info.
class Postal(object):
def _
On Feb 19, 1:18 pm, "Justin Findlay" <[EMAIL PROTECTED]> wrote:
> Canen, do you have the time to work out a full example? After much
> trying I'm still not able to repeat the example without having to use
> the double tuple values.
Nevermind. I misunderstood what you meant by repeating choices.
On Jan 25, 1:16 pm, "canen" <[EMAIL PROTECTED]> wrote:
> Answering my own question:
>
> The widget can be declared as part of the field, e.g.
>
> # Field
> class MoneyField(MultiValueField):
> def __init__(self, currency=(), amount=(), required=True,
> widget=None, label=None, initial=None):
>
=amount)
.
Or something like that.
On Jan 24, 8:36 pm, "canen" <[EMAIL PROTECTED]> wrote:
> Hello All,
>
> I am resending this -- seems it didn't reach the last time, sorry if it
> turns up twice
>
>
> I've been messing around with the
Hello All,
I am resending this -- seems it didn't reach the last time, sorry if it
turns up twice
I've been messing around with the new MultiValueField and MultiWidget.
I don't know if the shortcoming is with me or with the implementation
of the field and widget. L
11 matches
Mail list logo