Skip to content

3. Models

Carlos Aguilar edited this page May 16, 2018 · 1 revision

/testapi/quickstart/models.py

For this example, we've implemented a simple Point class with int attributes:

class Point(models.Model):
    x = models.IntegerField(default=0)
    y = models.IntegerField(default=0)

Clone this wiki locally