2011/11/10 Aleksandar Ristić <aleksandar1...@gmail.com>:
> If I understood correctly, you need to remove a user from a project. You
> can do it like this:
>
> datos.usarios.remove(User.objects.get(id=user_id))
> datos.save()
>

You don't need to save() the model instance after removing an item
from an M2M link - you haven't modified the model, the remove operates
immediately and removes the row from the link table.

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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