Quantcast
Channel: Django models, best way to save multiple values? - Stack Overflow
Browsing latest articles
Browse All 3 View Live

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 Article


Answer 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 Article

Django 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
Browsing latest articles
Browse All 3 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>