I'm trying to send data from a form to a database using this model, but i keep getting this error:
("Table 'trades.main_SomeModel' doesn't exist")
Here is my model:
class SomeModel(models.Model):
data = models.CharField(max_length=100)
def save(self):
super(SomeModel, self).save(using='dataset')
And here is my form:
class DataForm(forms.ModelForm):
class Meta:
model = Trade
fields = ("data",)
def save(self, commit=True):
send = super(DataForm, self).save(commit=False)
if commit:
send.save()
return send
I already tried this but it's not working: when i got to step 3, in fact, i got the error table "main_SomeModel" already exists
Note: i'm using two DBs. There is a default one and a second one. The data from this model should be sent to the second DB.
What am i doing wrong? Should i migrate again?