1.I have array of products and want to store it in mysql database using django model.I tried with 'ListTextField' in models.py as below,
products = ListTextField(
base_field=models.CharField(max_length=255),
size=100, # Maximum of 100 products in list
)
and I am using serializer to save data.But it is not working.
2.If I want to save data manually from views.py.How should I pass array of products in model object.for example,
obj=ContactDeatils(name='abc',products=['aa','bb'])
This gives me 'invalid syntax error' near products.
please help.