'which type of model in Django for this form of values?
I want to create a model in my Django app for this value, in this value we have ";" :
0;-0.0110227457430789;-0.0117428254241928;
How can help me please?
value = models.CharField(max_length=1000, blank=True, null=True)
Solution 1:[1]
First of all, the maximum length of CharField is 255.
(Every VARCHAR field's maximum length is 255)
If its a string, you can use CharField for that( if the length is not more that 255 )
If the string length can be more than 255, you should use TextField()
(TextField is not stored in VARCHAR type,its stored in BLOB)
CharField - max_length documentation
CharField documentation
TextField documentation
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Mark2 |
