Answer the question
In order to leave comments, you need to log in
How to exclude existing rows for CharField(choices)?
There is a field, let's say:
CUSTOM_CHOICES = [
('0', '0'),
('1', '1'),
('2', '2'),
('3', '3'),
]
choice = models.CharField(max_length=2, choices=CUSTOM_CHOICES, default=0, unique=True, )
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question