R
R
Rinat Bakiev2015-01-25 13:57:53
Django
Rinat Bakiev, 2015-01-25 13:57:53

Urgent m2m sorting in django?

Hello!
Not a programmer. Now we need to fix the display in the django admin panel of the display of the manytomany field (it is not convenient to search in the window on line 4).
class Project(models.Model):
kns = models.ManyToManyField(Knumber, blank=True, null=True)
What's the fastest way to at least sort this field in the admin?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey K, 2015-01-25
@mututunus

class Knumber:
    class Meta:
        ordering = ['<поле сортировки>']

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question