I am using a ModelChoiceField (default_project) in a form and want the
initial queyset to change when the form is created.
I've tried doing it like this:
forms.py --
class UserAccountForm(forms.Form):
.
default_project =
forms.ModelChoiceField(queryset=Project.objects.all(), requir
On Jun 1, 3:27 am, sorrison <[EMAIL PROTECTED]> wrote:
> I am using a ModelChoiceField (default_project) in a form and want the
> initial queyset to change when the form is created.
>
> I've tried doing it like this:
>
> forms.py --
> class UserAccountForm(forms.Form):
>.
>defaul
I'm sure there is a simple solution here, but I've been searching the
forum archive and elsewhere but so far haven't found an answer.
I have a form that uses some dynamic ModelChoiceField fields,
filtering the model for the logged-in user.
The form in app's forms.py, slight
On Tue, Feb 10, 2009 at 3:24 PM, wynfred wrote:
>
> I'm sure there is a simple solution here, but I've been searching the
> forum archive and elsewhere but so far haven't found an answer.
>
> I have a form that uses some dynamic ModelChoiceField fields,
> filt
> The issue is you are passing the kwarg "user" after the arg. Since user is
> the first param when you pass request.POST as the first arg it assumes it is
> user. Reorganize your arguments in some(make user first, or pass
> request.POST as a kwarg) way.
>
> Alex
Thanks, Alex. That was a huge h
5 matches
Mail list logo