Listing: Clear Listing Filter in Store App in Django - 19

Video thumbnail

The next step would be, finally, to create a button to clear the filter. It's that simple: that is, restart it, reset it, or whatever you want to call it.

For that, we'll need a button. I'm going to use the btn-secondary one, but I'd like to place it without a border, that is, without the default Bootstrap style.

In short, I want a more discreet design, something like this. The idea of ​​the design is for this button to be more visible in the background, and it's already visually obvious that the one with the most color (more prominent) is the one in the foreground.

So, it would look something like this:

<div class="col-auto">
    <button type="submit" class="btn btn-primary">Search</button>
</div>
<div class="col-auto">
    <a href="{% url 'elements:index' %}" class="btn btn-outline-secondary">Clean</a>
</div>

Remember this is the continuation:

Listing: Setting values ​​for server filter in Form in Django - 18

I agree to receive announcements of interest about this Blog.

We are going to implement a clear filter button.

- Andrés Cruz

En español

This material is part of my complete course and book; You can purchase them from the books and/or courses section, Curso y Libro desarrollo web con Django 5 y Python 3 + integración con Vue 3, Bootstrap y Alpine.js.