New update, I used ModelChoiceFields and ModelMultipleChoiceFields.
Problem solved :)
On May 23, 9:01 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I wrote a newforms form, but I have some problems when I want to test
> the class. Here's the definition:
>
> def _users():
>
On Wed, 2007-05-23 at 06:01 -0700, [EMAIL PROTECTED] wrote:
> Hello,
>
> I wrote a newforms form, but I have some problems when I want to test
> the class. Here's the definition:
>
> def _users():
> print "calling _users()"
> return [(u.id, u.get_full_name()) for u in
> User.objects.fil
If you put the call to your _users() function in the form __init__() I
think it will be what you are looking for. initi s called
automatically whenever an instance is created.
class MemoForm(forms.Form):
-snip-
def __init__(self,*args,**kwarg)
super(MemoForm,self).__init__(*args,**kw
If you put the call to your _users() function in the form __init__() I
think it will be what you are looking for. initi s called
automatically whenever an instance is created.
class MemoForm(forms.Form):
-snip-
def __init__(self,*args,**kwarg)
super(MemoForm,self).__init__(*args,**kw
If you put the call to your _users() function in the form __init__() I
think it will be what you are looking for. initi s called
automatically whenever an instance is created.
class MemoForm(forms.Form):
-snip-
def __init__(self,*args,**kwarg)
super(MemoForm,self).__init__(*args,**kw
I fixed my problem, but it's very much a hack. If anyone has a better
solution, please post it.
My fix was a simple hack: after every instantiation of my MemoForm
class, I called a method "replace_recipients" where I changed the
value of form_object.base_fields['recipients'].choices. Like I sai
I fixed my problem, but it's very much a hack. If anyone has a better
solution, please post it.
My fix was a simple hack: after every instantiation of my MemoForm
class, I called a method "replace_recipients" where I changed the
value of form_object.base_fields['recipients'].choices. Like I sai
I fixed my problem, but it's very much a hack. If anyone has a better
solution, please post it.
My fix was a simple hack: after every instantiation of my MemoForm
class, I called a method "replace_recipients" where I changed the
value of form_object.base_fields['recipients'].choices. Like I sai
I fixed my problem, but it's very much a hack. If anyone has a better
solution, please post it.
My fix was a simple hack: after every instantiation of my MemoForm
class, I called a method "replace_recipients" where I changed the
value of form_object.base_fields['recipients'].choices. Like I sai
Hello,
I wrote a newforms form, but I have some problems when I want to test
the class. Here's the definition:
def _users():
print "calling _users()"
return [(u.id, u.get_full_name()) for u in
User.objects.filter(is_active=True)]
class MemoForm(forms.Form):
body = forms.CharField(w
10 matches
Mail list logo