Created
February 26, 2018 14:33
-
-
Save LowerDeez/0f0aa59d1d705f98ec47035333270c25 to your computer and use it in GitHub Desktop.
Django. Float Choices
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blank_choice = ((None, '---------'),) | |
STAR_CHOICES = blank_choice + tuple((float(i*0.5), str(float(i*0.5))) for i in range(1, 11)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment