Skip to content

Instantly share code, notes, and snippets.

@chelseatroy
Created October 18, 2018 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chelseatroy/0cc4599e7c169963dd73881ae73fc73a to your computer and use it in GitHub Desktop.
Save chelseatroy/0cc4599e7c169963dd73881ae73fc73a to your computer and use it in GitHub Desktop.
Example Bird Class for Transactional AI App
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