Welcome to django-htmx-patterns Discussions! #2
Replies: 3 comments 2 replies
-
|
Big thanks for the articles, this is just the thing I'm looking for, for a long time. I'm interested in Django+HTMX a long time ago, but the idea of managing two template files for 'full page render' versus 'partial render' and check the request header and switch template in the view is a big NO to me. And your clever use of 'django-render-block' with decorators totally nail it. |
Beta Was this translation helpful? Give feedback.
-
|
I have a question. In your examples I see you're using very few packages. |
Beta Was this translation helpful? Give feedback.
-
|
Makes sense :)
Thank you.
Will try to stick with no packages for some new apps I am adding to my
django project
Thanks for making this repo public, it's helpful :)
…On Thu, Jul 3, 2025 at 8:50 AM Luke Plant ***@***.***> wrote:
Yep, I deliberately used the minimum of 3rd party packages, mostly because
I want to talk about the fundamental htmx + django patterns.
The other packages you choose depend on other needs and preferences. For
example, component libraries like django-components and cotton depend on
how much you go down the "component" line, which depends on how big your
project is, and I think it also ends up depending on your approach to CSS,
like the big "Tailwind or not". (If you use a more classic CSS approach
like CubeCSS <https://cube.fyi/>, then your "heading components" are <h1>,
<h2> etc. but if you use Tailwind you're probably going to want a
component just to do headings)
But people have a lot of different opinions on this, so the docs in this
repo choose to go with the minimum. My recommendation would be to add new
packages when you have specific reasons and needs to add them, know exactly
why you add them, and be sure that they are worth the complexity you are
adding
<https://lukeplant.me.uk/blog/posts/no-one-actually-wants-simplicity/>.
I haven't tried to use django-template-partials, it overlaps a lot with
the method I use, but I haven't compared the patterns in detail.
—
Reply to this email directly, view it on GitHub
<#2 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALFYCRBMEURRH4WK4MCNSOL3GTOGBAVCNFSM6AAAAACAVBOJIWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGNRUHEYTGNY>
.
You are receiving this because you commented.Message ID:
<spookylukey/django-htmx-patterns/repo-discussions/2/comments/13649137@
github.com>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
👋 Welcome!
We’re using Discussions as a place to share ideas and feedback. We hope that you:
Beta Was this translation helpful? Give feedback.
All reactions