What I have so far:
import app.models as models
if table_name == "Appliances":
model = models.Appliances
elif table_name == "ArtsCraftsAndSewing":
model = models.ArtsCraftsAndSewing
...
for index, row in df.iterrows():
model = model(param1=row[column1], param2=row[column2], ...)
model.save()
TypeError: 'Appliances' object is not callable
Basically I'm trying to call model = models.Appliances(param1=row[column1], param2=row[column2], ...) except the specific object changes depending on input.
Edit: Appliances and ArtsCraftsAndSewing have the same parameters.
table_namewill be same as model class name always?