Hi Peter,
> What should I pass as a dummy queryset parameter: this is positional
> mandatory argument and I cannot pass None.
If you're going to replace it before you render the form, it really doesn't
matter - any queryset will do.
I used .objects.all(), but that has the disadvantage of actua
On 8/7/07, Chris Brand <[EMAIL PROTECTED]> wrote:
> self.fields[f].queryset = queryset
> # Have to force the widget to update itself (bug 4787)
> self.fields[f].widget.choices = self.fields[f].choices
Hi Chris,
thanks for your help - it solved my problem,
> def my_view(request):
>
> class MyForm(forms.Form)
> emails = forms.ModelMultipleChoiceField(queryset=
> MyDBModel.objects.filter(user=request.user.id)
>
>
> But I'd like to have form declaration out of this view na pass user's
> ID as an argument - is there any way
On 2 Srp, 17:35, Nathan Ostgard <[EMAIL PROTECTED]> wrote:
> You can use ModelMultipleChoiceField for this:
>
> items =
> newforms.ModelMultipleChoiceField(queryset=Items.objects.all())
Hi Nathan,
I use it this way, but I need to reduce the queryset for current user
whom ID is contained in HTTP
Hi,
On 8/3/07, james_027 <[EMAIL PROTECTED]> wrote:
> I don't see ModelMultipleChoiceField on the documentaion or the latest
> source code
You can look at
http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py
till the documenation is updated.
> Thanks
> james
H
On Aug 2, 11:35 pm, Nathan Ostgard <[EMAIL PROTECTED]> wrote:
> You can use ModelMultipleChoiceField for this:
>
> items =
> newforms.ModelMultipleChoiceField(queryset=Items.objects.all())
>
I don't see ModelMultipleChoiceField on the documentaion or the latest
source code
Thanks
james
--~-
You can use ModelMultipleChoiceField for this:
items =
newforms.ModelMultipleChoiceField(queryset=Items.objects.all())
On Aug 2, 1:24 am, james_027 <[EMAIL PROTECTED]> wrote:
> hi
>
> somewhere on the django documentation I saw the choice provided for
> MultipleSelectField is from a Database but
hi
somewhere on the django documentation I saw the choice provided for
MultipleSelectField is from a Database but I can't recall where I read
it but I do it this way, let me know if there are better alternative
items = newforms.MultipleChoiceField(choices = [('i.id', 'i.name') for
i in Items.obj
8 matches
Mail list logo