Sign in
Search by keyword to find posts.
There are a total of 285 posts.
Published Jan 23, 2026 by whitedec
Extracting URLs in Django Templates: `request.path` vs `path_info` vs `get_full_path` vs `build_absolute_uri`
A concise guide to retrieving the current URL in Django templates. It compares request.path, request.path_info, request…
Allow Only Permitted HTTP Methods: Block Noise Requests with 405/444 in Nginx
Learn how to block abnormal HTTP methods like PROPFIND or MKCOL at Nginx using 405 or 444 responses. Cut traffic early,…
Published Jan 15, 2026 by whitedec
Understanding Pillow’s `open()`, `verify()`, and `load()` from a Security Perspective
Explore how Pillow’s `open()`, `verify()`, and `load()` methods affect image‑upload security. Learn practical strategie…
python-magic: The Most Practical Way to Trust File Content Over Extensions
python‑magic wraps libmagic to infer MIME types from file headers instead of extensions. This guide explains how to use…
Published Jan 14, 2026 by whitedec
What a Developer Sees in an Image File: Deconstructing the Structure
An image file is more than a picture—it’s a structured data set comprising a signature, header, optional metadata, and …
Let Nginx Handle File Delivery in Django with X‑Accel‑Redirect
When Django streams files directly, the app server can become a bottleneck. By using X‑Accel‑Redirect, Django handles p…
Published Jan 13, 2026 by whitedec
Django Image Upload Security Guide: Efficiently Preventing Server Crashes
A practical guide for Django‑based web services to secure image uploads while avoiding resource waste. Learn how to per…
Handling Homonyms in Django Internationalization: Avoiding the "Polish" Tragedy with Contextual Markers
This guide explains how to resolve translation conflicts in Django when the same word has multiple meanings. By using t…
Published Jan 05, 2026 by whitedec
Fixing Hidden Anchor Links Behind a Sticky Nav with Just a Few Lines of Inline CSS
Learn how to fix anchor links that get hidden behind a sticky navigation bar using simple inline CSS. Apply scroll‑marg…
Clearing Up the gettext vs gettext_lazy Confusion in Django (Understanding When Translation Happens)
Clear up the confusion between Django’s `gettext` and `gettext_lazy`. Learn when to translate immediately versus lazily…
Published Dec 24, 2025 by whitedec
from __future__ import annotations – The Future of Python Type Hints
Explore how `from __future__ import annotations` enables lazy evaluation of Python type hints, its evolution from PEP 5…
Why Specifying Width and Height on the Image Tag Matters
Specifying width and height on an <img> tag improves layout stability, reduces CLS, enhances user experience, and boost…
Mastering Dropzone.js: A Complete Guide to Easy File Uploads
A step‑by‑step guide to using Dropzone.js for HTML5 file uploads, covering CDN and npm installation, basic setup, custo…
Published Dec 22, 2025 by whitedec
Year‑End Server Checklist: 10 Essential Settings
As the year ends, servers become more vulnerable to unexpected outages. This guide outlines ten essential settings—disk…
Relearning Django from Scratch: A Roadmap Starting with HTTP
Relearn Django from scratch by starting with HTTP basics and a roadmap. Master Function-Based Views first, then move to…