2025-02-09
::
geoff
#mail
#web
#django
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.
2024-10-08
::
geoff
#django
#bookmarks
#fischer
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.
2024-10-06
::
geoff
#django
#bookmarks
#fischer
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.
2024-10-05
::
geoff
#django
#bookmarks
#fischer
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.
2024-10-04
::
geoff
#django
#bookmarks
#fischer
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.
2024-10-03
::
geoff
#django
#bookmarks
#fischer
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.
2024-03-24
::
geoff
#python
#pip
#poetry
#pypi
#100DaysToOffload
For the first time in quite a while, I caught the urge to publish a package to pypi today. The happy path for publishing a pure python package felt less obvious than I think it should’ve. Here’s what I did.
2024-02-19
::
geoff
#baseball
#fantasy
#100DaysToOffload
After a few years' layoff, I’m playing fantasy baseball again in 2024. Not only is this league quite a bit different from the one I used to play, the online resources for player research have changed over the past few years. This post collects some things that seem useful to me.
2024-01-15
::
geoff
#alpine
#docker
#vaultwarden
#100DaysToOffload
I’m blogging today’s yak shaving exercise because I found web searches challenging for some of this. And hopefully writing them down here will both help improve those searches and help me remember. Also, I am determined to blog more in 2024.
2023-10-22
::
geoff
#django
#jupyter
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.