otto-torino / django-baton

A cool, modern and responsive django admin application based on bootstrap 5 that brings AI to the Django admin - https://baton.sqrt64.it/
MIT License
876 stars 95 forks source link

How to set up popup filter? Cannot find templates from documentation #254

Closed vladyslav2 closed 1 year ago

vladyslav2 commented 1 year ago

Hello!

  1. Thank you for such a flexible and well build solution for django admin
  2. I'm trying to figure out on how can I adjust filter popup, based on the docs, but I don't see those files anywhere
        ('news/admin_filters_include_top.html', 'top', ),
        ('news/admin_filters_include_below.html', 'bottom', )
    image

And in your example app, I also were not able to find them. Can you please elaborate on how to create popup filters?

Thank you

abidibo commented 1 year ago

Hi @vladyslav2 ,

with this functionality you can inject YUOR templates inside the changelist filter section. That means you have to pass the path to the templates you define, it's all up to you.

In the example provided

('news/admin_filters_include_top.html', 'top', ),
('news/admin_filters_include_below.html', 'bottom', )

I had a news app and I created 2 templates:

news/templates/news/admin_filters_include_top.html

and

news/templates/news/admin_filters_include_below.html