Answer the question
In order to leave comments, you need to log in
Why does django convert it to another format when saving an object?
There is a tuple
CALL_SOURCE = (
(0, 'неопределено'),
(1, 'интернет'),
(2, 'наружная реклама'),
(3, 'рекомендация'),
(4, 'циан'),
(4, 'яндекс недвижимость'),
)
class Client(models.Model):
''' Карточка клиента '''
....
call_source = models.PositiveIntegerField(choices=CALL_SOURCE, blank=True, default=0)
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