For convenience, it is necessary to filter the m2m field by other fields of this model. The filter filter_horizontal = ('field name') does not match, as it searches for exactly the field name.

I would like to filter by the general field of the model. In my case there is an area in each case, I would like to implement filtering by areas. As you understand when there will be many cities it will be very inconvenient to choose

  • Add model code samples, admin.py. - Andrey
  • class Tariff_RostAdmin (admin.ModelAdmin): list_display = ('name', 'title', 'exept') fields = (('name', 'title'), 'info', 'city') search_fields = ['name' ,] - Nikita Khoroshaev
  • filter_horizontal = ['city',] - now I use this filter - Nikita Khoroshaev

0