django choices () rather than {}

`(` instead of `{`

 

    YEAR_IN_SCHOOL_CHOICES = (
        ('FR', 'Freshman'),
        ('SO', 'Sophomore'),
        ('JR', 'Junior'),
        ('SR', 'Senior'),
        ('GR', 'Graduate'),
    )



The problem was every time I run makemigrations it will generate a new migration file even if there are no changes in the model. The reason is that set is unordered, so every time you run makemigrations the order is different and that is detected as a change in the model.

你可能感兴趣的:(django)