1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Support index_together during model creation

This commit is contained in:
Andrew Godwin
2013-08-11 14:23:31 +01:00
parent 21be9fef7b
commit ae19315b4d
4 changed files with 40 additions and 2 deletions

View File

@@ -62,6 +62,15 @@ class Tag(models.Model):
app_cache = new_app_cache
class TagIndexed(models.Model):
title = models.CharField(max_length=255)
slug = models.SlugField(unique=True)
class Meta:
app_cache = new_app_cache
index_together = [["slug", "title"]]
class TagUniqueRename(models.Model):
title = models.CharField(max_length=255)
slug2 = models.SlugField(unique=True)