Sorry - I'm probably doing something silly here...

I have a 'Meeting' object which has a list of required attendees and a
list of optional attendees.  The admin interface works fine, but I'm
stuck when it comes to manipulating these relationships in my own code.


The attendees are Users.  So I have:

class Meeting(meta.Model):
...
   req_parts = meta.ManyToManyField(User,
                           verbose_name = "required participants",
                           help_text = "People who must be there",
                           singular = "reqparts",
                           blank = True)
   opt_parts = meta.ManyToManyField(User,
                           verbose_name = "optional participants",
                           help_text = "People who could be there",
                           singular = "optparts",
                           blank = True)

But how, in my own code, should I add a User to one of these lists?
The Meeting object has
get_reqparts_list() and get_optparts_list(), and I was hoping it might
have add_reqparts() as with ForeignKeys, but it only has
set_req_parts(), which seems to take a list of ids.

Is that the right way to do it? Doesn't feel right, but I couldn't find
any docs...

Many thanks....

Reply via email to