我有一个模型如下:
class EmployeeJobPost(models.Model):
title = models.CharField(max_length=100,blank=True)
years_of_experience = models.IntegerField(default=0, blank=True, null=True, choices=YEARS_OF_EXPERIENCE_CHOICES)
YEARS_OF_EXPERIENCE_CHOICES = (
(0, '0-1 Years'),
(1, '1+ Years'),
(5, '5+ Years'),
(10, '10+ Years'),
)
如何在 django 视图中访问 YEARS_OF_EXPERIENCE_CHOICES ?