Django loading mysql data into template correctly
- by user805981
I'm new to django and I'm trying to get display a list of buildings and sort them alphabetically, then load it into an html document. Is there something that I am not doing correctly?
below is models.py
class Class(models.Model):
building = models.CharField(max_length=20)
class Meta:
db_table = u'class'
def __unicode__(self):
…