class Volunteer(models.Model):
jobs = models.ManyToManyField( 'Job', blank=True )
The following ModelForm displays a Multi-select widget so I can choose
all the jobs for a volunteer:
class VolunteerForm( ModelForm ):
class Meta:
model = Volunteer
This is some fairly basic Django. However, I'd also like to be able
to edit in the other direction -- from a Jobs form, I'd like to be
able to see a Multi-select widget containing all the volunteers who
have this job and select/unselect them. I can't quite wrap my brain
around this and I've found no clues by searching the web. Does Django
provide some facility to accomplish this or do I have to build
something from the ground up?
Thanks.
Wilb
I'd like to see a Multi-select widget containing ALL the volunteers,
with those who currently have the job selected. I'd like to them be
able to select additional volunteers for that job or unselect existing
ones.
Wilb
Le 28 mars 2010 à 22:29, "pjrh...@gmail.com" <pjrh...@gmail.com> a
écrit :
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to django-users...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en
> .
>
Thanks for point this out.