hi,
Suppose for example that we have:
class Aclass(models.Model):
be = models.ForeignKey('B')
ce = models.ManytoManyfield('C')
class B(models.Model):
[...]
class C(models.Model):
[...]
Suppose that with admin interface, I put:
be = b1 (b1 is B)
ce has c1, c2, c3 objects (c1, c2 and c3 are in C)
in an object p (p in Aclass)
I want to delete the relation that ce has c1 without deleting c1.
How can I do that with shell?
Do you understand that I want? If I run:
p = Aclass.objects.get(pk=1) # p is the object I have
p.be.all()
b1
p.ce.all()
c1, c2, c3
I want that p.ce.all() will be empty set, but c1, c2 and c3 exits as
intances of class C
Thanks in advance,
Xan.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---