Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. ("Table 'trades.main_trade' doesn't exist")
  2.  
  3. class SomeModel(models.Model):
  4. data = models.CharField(max_length=100)
  5.  
  6. def save(self):
  7. super(SomeModel, self).save(using='dataset')
  8.  
  9. class DataForm(forms.ModelForm):
  10.  
  11. class Meta:
  12. model = Trade
  13. fields = ("data",)
  14.  
  15. def save(self, commit=True):
  16. send = super(SomeModel, self).save(commit=False)
  17. if commit:
  18. send.save()
  19. return send
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement