Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django multi column index

from django.db import models

class Customer(models.Model):
    first_name = models.CharField(max_length=100)
    last_name = models.CharField(max_length=100)

    class Meta:
        index_together = [
            ["first_name", "last_name"]
        ]
Source by docs.djangoproject.com #
 
PREVIOUS NEXT
Tagged: #django #multi #column #index
ADD COMMENT
Topic
Name
9+4 =