mirror of
https://github.com/django/django.git
synced 2025-11-17 02:24:22 +00:00
[1.5.x] Fixed #5805 -- it is now possible to specify multi-column indexes. Thanks to jgelens for the original patch. Backport of 4285571c5a.
This commit is contained in:
parent
26e0651c42
commit
6f716e9e5f
12 changed files with 121 additions and 40 deletions
|
|
@ -17,6 +17,7 @@ class Reporter(models.Model):
|
|||
def __str__(self):
|
||||
return "%s %s" % (self.first_name, self.last_name)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Article(models.Model):
|
||||
headline = models.CharField(max_length=100)
|
||||
|
|
@ -28,3 +29,6 @@ class Article(models.Model):
|
|||
|
||||
class Meta:
|
||||
ordering = ('headline',)
|
||||
index_together = [
|
||||
["headline", "pub_date"],
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue