Skip to content

Instantly share code, notes, and snippets.

View thomst's full-sized avatar

Thomas Leichtfuß thomst

  • SYSTOPIA
  • Bonn, Germany
View GitHub Profile
@thomst
thomst / multiselectdjangofilters.py
Last active January 13, 2021 08:20
Multi-Select-Filter for django 1.11
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.db.models import Q
from django.utils.translation import gettext_lazy as _
from django.contrib.admin.utils import reverse_field_path
from django.contrib.admin.utils import get_model_from_relation
from django.core.exceptions import ValidationError
from django.contrib.admin.options import IncorrectLookupParameters