Robert Wallner
Robert Wallner

Reputation: 1

Filtering by more than one field in django admin

Is it possible to filter results in django's admin interface, by more than one field? For example in the following model

class Account(models.model):
    name = model.CharField(max_length=64)

class Row(models.model):
    date = models.DateField()
    account = models.ForeignKey(Account)

is it possible to filter the Rows in the admin by both date AND account?

Thanks in advance

Upvotes: 0

Views: 1025

Answers (1)

Goin
Goin

Reputation: 3964

Of course, in your model admin put somethinkg like this:

list_filter = ('date', 'account')

Upvotes: 3

Related Questions