Today I Learned

A collection of small discoveries and learnings
about Django, Python and web development in general.

Set up Litestream

TIL posted on June 15, 2024
A guide to setting up Litestream with Docker Compose for continuous SQLite database replication to S3, including configuration files and startup scripts.
Tags: Databases

Create a custom logging filter

TIL posted on June 5, 2024
Learn how to create a custom logging filter in Django to exclude specific 404 error messages from your logs based on URL patterns.
Tags: Backend

Set up Cloudfront as a CDN to serve media files

TIL posted on May 27, 2024
A guide on configuring Cloudfront CDN to serve media files from an S3 bucket in a Django application, including AWS console setup and Django configuration.
Tags: Backend

Upload media files to an S3 Bucket

TIL posted on May 24, 2024
A guide on configuring Django to store media files in S3, including local development setup with Localstack and Terraform.
Tags: DevOps

Define environment variables in a Makefile

TIL posted on May 10, 2024
Learn how to dynamically define environment variables in a Makefile using $(eval) when the variable value depends on files that don't exist yet during Makefile parsing.
Tags: Developer Experience

Document Search with Scikit-Learn

TIL posted on April 25, 2024
Implementing keyword search on documents using scikit-learn's binary CountVectorizer for text analysis
Tags: Backend

Server Sent Events

TIL posted on April 21, 2024
A practical exploration of implementing Server Sent Events in Django, including challenges with async servers, event stream formatting, and connection handling.
Tags: Backend Frontend

Drag and Drop with HTMX and Sortable.js

TIL posted on April 20, 2024
A tutorial on implementing drag-and-drop functionality in Django using HTMX and Sortable.js, featuring a simple single-file application example.
Tags: Frontend

Dynamic formsets with Alpine.js

TIL posted on November 18, 2023
A guide on implementing interactive form management in Django using Alpine.js, allowing users to dynamically add and remove forms while maintaining proper formset functionality.
Tags: Frontend

Floating labels for select fields

TIL posted on October 26, 2023
A guide on implementing floating labels for select fields using Tailwind CSS, including HTML structure and CSS styling for proper label positioning.
Tags: Frontend

Loading spinners for htmx requests

TIL posted on October 13, 2023
Learn how to implement loading spinners for HTMX requests using Tailwind CSS, with two different approaches for better user feedback during form submissions.
Tags: Frontend

Custom select dropdown with search in Alpine.js

TIL posted on September 22, 2023
A tutorial on creating a custom select dropdown with search functionality using Alpine.js, including step-by-step implementation and complete code example.
Tags: Frontend

Floating labels with Tailwindcss

TIL posted on September 21, 2023
A guide to implementing floating form labels using Tailwind CSS's peer selector, including HTML structure and CSS styling with the tailwind forms plugin.
Tags: Frontend

Debugging with VSCode

TIL posted on September 11, 2023
A guide to setting up and configuring remote debugging in VSCode for Python/Django applications, including Docker support.
Tags: Developer Experience

Build a multi-step form with Django and htmx

TIL posted on September 6, 2023
A guide to creating a multi-step form wizard using Django and HTMX, with form data persistence between steps using hidden inputs and a preview step before final submission.
Tags: Frontend

https://

TIL posted on July 26, 2023
An overview of HTTPS, TLS, and SSL certificates, covering how they work, self-signed certificates, certificate authorities, and different approaches to implementing secure connections.
Tags: Security

Understanding Gunicorn

TIL posted on June 23, 2023
A comprehensive guide to Gunicorn, the Python WSGI HTTP server, covering its basics, configuration, and deployment best practices.
Tags: Backend

SQLite in Production

TIL posted on June 18, 2023
A comprehensive guide on using SQLite in production with Django, covering performance optimizations, write-ahead logging, and practical configuration steps.
Tags: Databases