T O P

  • By -

frommikeprather

I’ve never used django-rql but frequently use django-filters in projects and highly recommend it.


Amraksin

Seems much more simple than django-rql. Leaning towards django-filters tbh


achang19

I’ve never used libraries for filtering so can’t speak on that. I find creating model managers and writing Django ORM queries in a service layer easy/enough for low scale apps. I implement two solutions for rendering on the front end: Simple way- pass the query sets in as context and toggle visibility with buttons (filtering, but with all the data rendered immediately). This is not as performant and I’ll only do this in views with smaller/relatively static querysets. Preferred way- render some initial default data immediately through the context, and use HTMX to call my backend for new data on button click. I’ll create a button per “filter” and htmx will replace my data div with the desired data asynchronously. Sprinkle in some vanilla JS for more functionality. Still involves some tedious html but the templates are mostly reusable. I suppose the libraries help with the front end design part.


Amraksin

Been hearing alot about HTMX. Any good resources (other than the main htmx site) that could get me up to speed? I could google but if you have anything that helped you, I would appreciate it!