I'm not expierenced in python. I need to define field 'year' with range restriction. Now i'm using this code, but I think there exists shorten way to do this.
YEAR_CHOICE = []
for year in range(2020,1899,-1):
YEAR_CHOICE += [(year, year)]
year = models.PositiveSmallIntegerField('Year', choices=YEAR_CHOICE, default=0)
Is therу any ways to define 2-tuples in one line? May be I can make field what I need in other way? Thank you!