Initially, I started using Python’s Pelican, but pelican-import (pelican’s tool for migrating from blogger) doesn’t work as well as jekyll-import. It turned comments into posts and threw exceptions while processing draft posts without content. Also, the first docs that show up on google for Pelican aren’t the latest docs. This causing issues when I followed the old docs that said to use Python 2.7, but Pelican only supports Python 3.6+ now.
Found a massive faillog/lastlog file recently and thought it was responsible for using up all my disk space. Turns out it’s actually a sparse file and doesn’t take up that much physical space: https://unix.stackexchange.com/a/530157
The problem was caused by an accidental call to logging.info (without using logging.getLogger to get a specific logger) while the root logger isn’t already configured.
The solution ended up being to get rid of the accidental calls to logging.info and configuring the root logger to prevent it from accidentally happening again. I go into more details in that repo.
Vue-custom-element turned that code into 3 lines and allowed using components like normal (without the data attributes).
This approach seems much better than: https://vsupalov.com/vue-js-in-django-template/ Which doesn’t allow for using a build pipeline for babel, linting, testing, single page components, live reload, modules with import/require, etc.
I made a repository to try to figure out the best way to require prefetch_related/select_related when fetching a model’s related objects. I also want to figure out a good pattern for avoiding duplicated prefetch_related/select_related for multiple places in a codebase that need the related objects eager loaded in the same way.
It would be nice to know a better way to cache the ModelChoiceField’s queryset when it’s used in a form that runs is_valid() in a loop (like Formsets do). The best way I know how at the moment is by not using a ModelChoiceField at all. The solution requires using a ChoiceField, running the query for choices outside of the loop, then passing the choices into the form to override the ChoiceField choices.