📜  django 多列索引 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:56.924000             🧑  作者: Mango

代码示例1
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"]
        ]