I have a Django model that uses the choices
attribute.
COLOR_CHOICES = (
('R', 'Red'),
('B', 'Blue'),
)
class Toy(models.Model):
color = models.CharField(max_length=1, choices=COLOR_CHOICES)
My code is in production and now I'd like to add additional choices.
COLOR_CHOICES = (
('R', 'Red'),
('B', 'Blue'),
('G', 'Green'),
)
How do I go about doing this? Does Django use Database constraints to enforce choices? Do I need to do a Database migration (I'm using South)? Or does Django just enforce the choices restriction in Python code and all I have to do is change the code and restart?
Thanks!