Created
October 18, 2018 14:58
-
-
Save chelseatroy/0cc4599e7c169963dd73881ae73fc73a to your computer and use it in GitHub Desktop.
Example Bird Class for Transactional AI App
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
class Bird(models.Model): | |
species_choices = [ | |
("Spix's Macaw", "Spix's Macaw"), | |
("Cockatiel", "Cockatiel"), | |
... | |
("Caique", "Caique"), | |
("Guam Kingfisher", "Guam Kingfisher") | |
] | |
species = models.CharField(max_length=50, choices=species_choices) | |
image = models.ImageField(upload_to = 'images/', default = 'image/default.jpg') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment