Canary Islands
Joined August 2011
I just open-sourced my first Django package: Cotton. Inspired by Vue, Svelte and Laravel Blade components, it brings component-based design to Django templates. Check it out! 🙏 github.com/wrabit/django-cot…
6
8
2
62
5,799
I finally found some time to finish the first release of an official (yet completely optional) Cotton UI Kit. As we're still <v1 there could be some changes but having already ironed out a lot of creases I'm using comfortably on 3 projects. django-cotton.com/ui
1
2
197
I've included a theme builder widget so you can preview customization and copy the css override.
23
A few things I've noticed as all devs write code with AI. When you write foundational / architectural code of a new project by hand, you "feel" the code pushing back if your abstraction isn't right. You feel when something is harder than it should be. The code is telling you it's not in the right shape. Good engineers are sensitive to this. When you're using an LLM, you keep pushing right through this in a way that feels like you're making progress, and it may even be directionally correct in a sense, but the underlying foundation of it all is actually bad in a way that either kills progress of the LLM later as it buckles under the complexity it has created or destroys your ability to maintain the code long term. Related to this, I see a general restlessness with just sitting and thinking about a problem for a while. As I've been working on a new library here at Laravel, there have been days where it feels like I mainly just stare at my screen thinking about something. When Claude Code is at your fingertips, it's tempting to just start yapping into the terminal and watching code come out the other end. Again, directionally correct in some ways, but often doesn't land on the elegant solution that is waiting to be discovered.
262
467
124
3,904
492,025
I wrote up a blog post demonstrating my reason for starting to use django-cotton. In short: when I want an include that can accept one or more blocks of HTML, I'll use a component instead. treyhunner.com/2025/03/djang… #Python #Django
1
3
12
996
Currently trying Django Cotton in pair with @htmx_org and django-template-partials and.. it's a banger ! Trying to see if I really need template partials though if you go full component mode with django cottons. Once everything is its own component and with the flexibility django cotton adds, I don't really see a good use case. I am building a small library of components based on Daisy UI and with HTMX doing it's magic + django's ORM and features in the backend, really is the best DX.
5
2
7
1,094
Writing reusable and composable UI components can be achieved using the good 'ol django templates, with the help of some libraries to fill in the gaps (like django-components, django-cotton and TailwindCSS) Check out my talk at Djangocon US
1
4
5
410
To the dads with young, young kids, here's my one piece of advice. Become a morning person, and fit all of your hobbies into the hour or so before everyone else in your house wakes up. Read, hike, play a video game, whatever you like. But at 6am. :/ You'll get used to it haha.
37
12
3
212
13,284
#django cotton seems like the missing piece when you are building large applications. If you are a serious django developer you owe it to yourself to give it a try.
2
1
1
318
Now you can create amazing reusable React-like component in Django with django-cotton. I've been waiting this for a long time.
1
11
4,058
A reusable component system was the last missing piece to building serious front ends in the Django / HTMX low-JavaScript world. I've only been using it for a couple weeks but so far cotton feels like the answer.
I just open-sourced my first Django package: Cotton. Inspired by Vue, Svelte and Laravel Blade components, it brings component-based design to Django templates. Check it out! 🙏 github.com/wrabit/django-cot…
2
9
2
65
3,397
Wow, django-cotton is incredible. Define, use with `<c-button>` (or whatever the template name is) and see the results. I've been wanting a shadcn-like template for Django. I think django-cotton is the key to making that happen. Just needs to learn a few more bits about it.
10
8
44
2,623
I just published a Django Cotton component library of Heroicons. It's super simple to use and has all the latest icons. Here's a quick taste: <c-heroicon.check-circle /> pypi.org/project/cotton-hero…
1
1
10
280
django-cotton、いいよねえ
1
2
125