Esempio n. 1
0
 def save(self, force_insert=False, force_update=False, using=None):
     data = self.cleaned_data
     Owned.objects.get(property=data['property_losing']).delete()
     owned1 = Owned(property=data['property_losing'], user=User.objects.get(pk=2))
     owned = Owned(property=data['property'], user=User.objects.get(pk=1))
     owned.save()
     owned1.save()
     return owned, owned1
Esempio n. 2
0
 def save(self, force_insert=False, force_update=False, using=None):
     data = self.cleaned_data
     owned = Owned(property=data['property'], user=User.objects.get(pk=1))
     owned.save()
     return owned