Skip to content
Advertisement

How can I store an array of strings in a Django model?

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.

JavaScript

Thanks for the help.

Advertisement

Answer

Make another model that holds a string with an optional order, give it a ForeignKey back to myClass, and store your array in there.

Advertisement