On Sun, Dec 26, 2010 at 1:15 PM, Emmanuel Mayssat <emays...@gmail.com> wrote:
> Hello,
>
> I have a modelform with a model which include a models.many_to_many field.
> By default the modelform represents those m2m entries with a
> multiplechoice field
>
> http://docs.djangoproject.com/en/dev/topics/forms/modelforms/
> example:
> tag_set = forms.ModelMultipleChoiceField(queryset=Tag.objects.all())
>
> 1/ when I initialize my model form (form(instance=defaultinstance)), I
> would like the m2m entries to
> appear as a form.TextInput with default value of defaultinstance.tag_set.all()
>

Here the question how do I get the defaultinstance tags?
Maybe self.instance.tag_set.all() ?!?!?

How do I populate my widget?
forms.TextInput(attrs={'size':70}, default=????????),

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to