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 →

dj-notebook: the REPL I’ve Always Wanted for Django

This year, I’ve really started to like jupyter notebooks. I first tried them out several years ago, but they’ve only just started to click for me. They haven’t changed; the difference is how I think about them. When I initially tried them, they felt like writing untestable code in a browser, where you could get yourself into an unknowable state very easily as you navigated between cells. While they certainly can be that, it was an incomplete impression, at best.

One thing changed my mind this year: I learned about the --notebook option for django-extensions shell_plus management command. shell_plus is a command that gives you a REPL with all your django models and many of the framework’s utility classes imported and ready to go. The --notebook option has shell_plus import that all into a jupyter notebook that you can access from your browser. Or that you can save and access from your IDE’s notebook support. It’s like absolute magic when it works, but lately you have to hold your jaw just right and explicitly specify a few dependencies' versions in order to make it work. It was 15 minutes of internet searching every time I felt like I was going to spend enough time in my REPL to want it. I recently learned about dj-notebook, which fixes that and adds a few useful features on top of it.

Read more →

Hypermedia Systems - Using Django - More htmx patterns

I’m working through Hypermedia Sytstems using django and htmx in public. This post starts applying the patterns from Chapter 6: More Htmx Patterns.
Read more →

Hypermedia Systems - Using Django - Adding htmx (pt 2)

I’m working through Hypermedia Sytstems using django and htmx in public. This post continues to work through Chapter 5: HTMX Patterns.
Read more →

Hypermedia Systems - Using Django - Adding htmx (pt 1)

I’m working through Hypermedia Sytstems using django and htmx in public. This post picks up with Chapter 5: HTMX Patterns.
Read more →

Hypermedia Systems - Using Django - Contacts.app Web 1.0 edition

I’m working through Hypermedia Sytstems using django and htmx in public. This post covers building out the Web 1.0 edition of the book’s contacts app.
Read more →