1
0
mirror of https://github.com/django/django.git synced 2025-01-09 09:55:57 +00:00
django/tests/model_indexes/models.py
2017-03-21 10:53:21 -04:00

24 lines
471 B
Python

from django.db import models
class Book(models.Model):
title = models.CharField(max_length=50)
author = models.CharField(max_length=50)
pages = models.IntegerField(db_column='page_count')
class AbstractModel(models.Model):
name = models.CharField(max_length=50)
class Meta:
abstract = True
indexes = [models.indexes.Index(fields=['name'])]
class ChildModel1(AbstractModel):
pass
class ChildModel2(AbstractModel):
pass