Using marimo with Django

A couple of years ago, I got lucky and found Daniel Roy Greenfeld’s dj-notebook project thanks to a reddit post. I wrote about it here. It’s held up well. I still find it very useful in almost any context where I’d run python manage.py shell to help me understand what’s going on with a django site. My preferences for using notebooks have evolved since then, though. Lately, I find marimo notebooks more suited to the way I like to use (and re-use) notebooks than jupyter. They’re easier to deal with in git, easier to share, and they don’t have the same tendency to depend on hidden state. While they’re also, as a consequence, a bit less flexible, they strike a better balance for me.

So this weekend, I wanted to see how they’d work with django.

Read more →

A New Management Command for Running Django + npm dev scripts

Even though simple django templates can take you very far, sometimes it’s nice to use packages from the npm ecosystem. And if you’re using tailwind, unless you’re pulling a huge development bundle, you already need a build step. vite is a great improvement to all of this, but it still leaves you needing to both run the vite development server and the django development server in order to develop locally.
Read more →

Upgrading Python Packages (pip-tools and uv)

The django project announced some important security releases today. I have a few production applications running django, and while none of them were due for a release today, these updates seem like they could be necessary for me. And I had to look up how to update these when I’m not changing a version constraint, so I’m writing it down here in hopes that I’ll make it more memorable.
Read more →

Python One-liner: Django Secret Key

I want a valid new Django secret key just often enough to need to know how to generate one quickly and easily but not quite often enough to remember it. I’m pasting the one-line command here, in hopes that I’ll remember it or find it faster. (The pipe to pbcopy is Mac-specific; substitute your desktop’s equivalent.)
Read more →

Mailpit for Web Apps that Send Email

Almost every time I build a web gadget, I need to send a few emails. Making sure those messages are sent when they should and look the way they should is a real weak point of django tooling, IMO. Mailpit is an easy way to run past that.
Read more →

Fischer, Part 4: Configuring Django Authentication

Today I’d like to experiment with some nice interfaces for tagging and showing tagged bookmarks. But it feels too clunky to log into the django admin then navigate back, so first I want to get Django authentication set up. I suspect that if this turns into something I want to share with others, I’ll eventually wind up with allauth, but that feels too heavy for now. And setting up Django’s built-in authentication isn’t hard.
Read more →

Fischer, Part 3: Importing and Exporting Bookmarks

In order to further iterate on Fischer, I’m going to need to be able to test with a reasonably large pile of bookmarks. That’s going to get tedious quickly if I can’t import and export them as I experiment. In the past, the shortest path to doing this has been using django-import-export and either a script or django admin integration. I’d prefer a script for this, so I’m also going to use django-extensions to get the runscript management command and easily run them from nanodjango.
Read more →

Fischer, Part 2: Tagging

In Part 1, I learned how to do views and routes in nanodjango, got some basic templates set up, and vendored Pico CSS to make those pages look a little nicer. Tagging is going to be an important part of making this all work the way I want, and the easiest way to solve that is with django-taggit. I’m tackling this next so I can learn whether adding a third-party app means I need to go ahead and expand my little nanodjango project into a full, multi-file project already.
Read more →

Fischer, Part 1: Getting Started

I know there are a few new practices that I should adopt as I start new projects, but part of the purpose of this one is trying out nanodjango. So I’m keeping my other stuff the same, including pyenv, black, and poetry usage, for now in order to save my innovation tokens.
Read more →

’90s-style Start Page for my Browsers

Lately, I find myself missing the dynamic start pages we used to set for our browsers in the late 1990s. The ones I liked eventually turned into search engines, got crapped up by ads, or just plain went away. All of the above, in many cases. For a while, I didn’t miss them, because feed readers and synchronized bookmarks kind of took their place, for the most part. But now I find myself wanting to go back to that, because feed readers and synchronized bookmarks don’t work the way I want them to anymore. So maybe it’s worth building something new that works just how I want.
Read more →