Answer the question
In order to leave comments, you need to log in
How to sort objects by multiple values?
FILM = 0
SERIAL = 1
CARTOON = 2
ANIME = 3
ANIMATED_SERIES=4
TYPE_PICTURE = (
(FILM, 'Film'),
(SERIAL, 'Serial'),
(CARTOON, 'Cartoon'),
(ANIME, 'Anime'),
(ANIMATED_SERIES, 'animated-series')
)
class Picture(models.Model):
''' модель для картины (фильма, мультфильма, аниме)'''
type_picture = models.PositiveSmallIntegerField(choices=TYPE_PICTURE, blank=True, null=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