models.py 242 B

12345678910
  1. from django.db import models
  2. from django.utils.encoding import python_2_unicode_compatible
  3. @python_2_unicode_compatible
  4. class Thing(models.Model):
  5. num = models.IntegerField()
  6. def __str__(self):
  7. return "Thing %d" % self.num