Raphi Rambles

Happy Pony

Apparently, Django turned 20 two days ago.

I've worked with the framework professionally for about five years1, and kept using it occasionally since I quit my job. Two weeks ago, I started fooling again with it on something slightly less trivial2 than the minimalist sites or tools I've been hacking on for the last few years.

Being busy with this side project and a few other things, I stopped posting on here, so in order not to lose the writing habit I've been trying to build, I figure joining in the celebration is as good a topic as any.

Long story short: it's still awesome.

Catching up with an old friend

As I just said, I didn't really use the framework seriously for a little over 5 years. And I was amazed at how little the general experience has changed.

I expected to spend way more time re-learning things I had forgotten, and while I did have to look up a bunch of things, those were mostly minor details like import paths or parameter names, which were trivial to check3. The overall structure felt just as intuitive as it did when I spent my days with it.

It's hard to tell how much of this comes from ingrained habits, but I think it does speak to the quality of the API. Just like UI, a good API should stay out your way. You might need to spend some time to learn it, but once you know it, you barely notice it anymore.

Also, no matter how good the docs are, sometimes it's quicker to just check the source, which I did a few times over the last weeks. I've had to dig into some library code to understand what was going on many times, and django's source is easily one of the cleanest codebases I ever explored4. I learned a lot from it back in the day, and it's still a joy to read.

The right tool for the job

While I wouldn't call it bloated, django can feel overkill for some things. I've been meaning to adopt a more minimal approach for most of my computing, which is why this blog runs on pelican.

But if I have to deal with a database, then fuck it. Knowing I can generate an admin interface with a couple lines of configuration has spoiled me. Hell, I'll throw together a few models and run the admin locally rather than use a spreadsheet. People call me crazy when I tell them this, and they're probably right. But I haven't used a spreadsheet since high school and doing things this way is actually less work than learning how those work again. With a nicer interface to boot.

I'm still half looking for an excuse to use some intermediate framework like flask or bottle. But for the tool I'm building, I knew right away django was the perfect fit.5

The long road

In the world of web dev, 20 years ago is prehistory.

Django was already stable and had been for a while when I first learned it back in 2013. You know, back when code was written on clay tablets and the cloud belonged to pterodactyls.

In an industry so obsessed with chasing the latest trends, the fact that it is still relevant is frankly refreshing. I don't follow the news much anymore, but from what I've gathered, the framework is still popular, but seems to stay out of the hype cycle. It's old tech by now, just as reliable as it's always been, quietly evolving without making a fuss about it.

I'll take this over shiny new crap any day. Here's to hoping this old workhorse will still be around in 2045.

Should you use Django ?

I dunno. Use what you want. I don't care.

The django (sadly) unoficial logo, which is a pony

But if you do, you'll get a pony.


  1. From early 2014 to late 2019. 

  2. It's just a pretty simple CRUD app, nothing fancy or complex, but it's still closer to a "real" website than a quasi-static site with a single db table. 

  3. I remembered the documentation being pretty good. It still is. 

  4. Python helps a lot with this, and definitely deserves some of the credits. But still. Most of the python code I've read was pretty clean, but not as clean as this. 

  5. In fact, it could have been another quick admin job and finished in a day. I decided to build a nicer frontend for it and use this as an excuse to learn more about htmx. And got distracted fooling with fun stuff I don't really need along the way. 

^