Answer the question
In order to leave comments, you need to log in
What is the best way to do indexing in Django 1.11?
I'm making an application on Django 1.11.
Advise whether it is worth creating indexes in the database in a new way:
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:
indexes = [
models.Index(fields=['last_name', 'first_name']),
]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question