In that case, I believe you can remove it with
user.province_set.remove(province)
user.save()
if you have the user and province objects.
I am going from memory here. I tried to find this in the docs to make
sure but couldn't.
Hope this helps,
Casey
On 03/09/2011 10:02 AM, galgal wrote:
Thanks, but I don't want to delete any "main" objects. I want to delete
ONLY 1 specific relation - I know user and province, and want to unlink
the user from province.
--
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.
--
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.