Boston Python Workshop/Saturday/Web app project: Difference between revisions

Line 173:
choice = models.CharField(max_length=200)
votes = models.IntegerField()
 
Save the models.py file.
 
All models in Django code are represented by a class that subclasses django.db.models.Model. Each model has a number of class variables, each of which represents a database field in the model.
Anonymous user