↧
Answer by Burhan Khalid for Django models, best way to save multiple values?
Use a through table, that will let you add extra context to the relationship.class UrlData(models.Model): pda = models.FloatField() upa = models.FloatField()class SaveMozData(models.Model): savemoz =...
View ArticleAnswer by Sayse for Django models, best way to save multiple values?
Make m a seperate model/class that represents the dataclass GoodNameForM(models.Model): moz = models.ForeignKey(SaveMoz) pda = DecimalField() upa = DecimalField()Please be sure to give your fields...
View ArticleDjango models, best way to save multiple values?
I need to save multiple values for the same foreign key. Let me give you an example:class SaveMoz(models.Model): keyword = models.ForeignKey(KW) m1 = ? m2 = ? m3 = ? m4 = ?Each of these fields SHOULD...
View Article