silentsokolov / django-admin-rangefilter

A Django app that lets you filter data by date range and numeric range in the admin UI
MIT License
721 stars 106 forks source link

Incompatibility with Django Unfold theme #125

Closed arsiboo closed 3 months ago

arsiboo commented 3 months ago

I'm using Django Unfold and after enabling rangefilter and adding ("publication_date", DateRangeFilterBuilder()) in my list list_filter, the filters menu gets messed up. Here I attached a couple of screenshots for your reference.

Screenshot-2024-08-01-at-13 24 49 Screenshot-2024-08-01-at-13 24 31

Do you have any suggestion on how to fix this?

Here is the list of my INSTALLED_APPS in settings.py:


INSTALLED_APPS = [
    "unfold",  # before django.contrib.admin
    "unfold.contrib.filters",  # optional, if special filters are needed
    "unfold.contrib.forms",  # optional, if special form elements are needed
    "unfold.contrib.inlines",  # optional, if special inlines are needed
    "unfold.contrib.import_export",  # optional, if django-import-export package is used
    "unfold.contrib.guardian",  # optional, if django-guardian package is used
    "unfold.contrib.simple_history",  # optional, if django-simple-history package is used
    "rest_framework",
    "daphne",
    "app",
    "rangefilter",
    "django.contrib.admin",
    "django.contrib.auth",
    "django.contrib.contenttypes",
    "django.contrib.sessions",
    "django.contrib.messages",
    "django.contrib.staticfiles",
    "allauth_ui",
    'allauth',
    'allauth.account',
    'allauth.socialaccount',
    'allauth.socialaccount.providers.google',
    "widget_tweaks",
    "slippers",
]

I don't have any custom theme configurations, it's just unfold out of the box.

Thanks in advance

silentsokolov commented 3 months ago

django-admin-rangefilter supports only default django admin UI

You can override templates and fix HTML/CSS for your UI