Skip to content

Instantly share code, notes, and snippets.

View JakubDotPy's full-sized avatar
😎
Git - Loose your files in space AND time.

Jakub Červinka JakubDotPy

😎
Git - Loose your files in space AND time.
View GitHub Profile
@JakubDotPy
JakubDotPy / json_fieled_filter.py
Last active October 8, 2021 14:10 — forked from gauravvjn/admin.py
Use JSONField properties in Django admin filter Raw
"""
More details on the implementation and usage can be found at
https://www.pyscoop.com/django-jsonfield-attributes-in-admin-filter/
"""
from django.contrib import admin
from django.core.exceptions import ImproperlyConfigured
class JSONFieldFilter(admin.SimpleListFilter):