Issue
I am building a Django data model and I want to be able to store an array of strings in one of the variables; how can I do that?
e.g.
class myClass(models.Model):
title = models.CharField(max_length=50)
stringArr = models.???
Thanks for the help.
Solution
Make another model that holds a string with an optional order, give it a ForeignKey
back to myClass
, and store your array in there.
Answered By - Ignacio Vazquez-Abrams
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.