Blog: Simon Willison's Weblog: django

Talk Python: Celebrating Django's 20th Birthday With Its Creators

Aug. 29, 2025 » Simon Willison's Weblog: django » [Archived Version]

Talk Python: Celebrating Django's 20th Birthday With Its Creators I recorded this podcast episode recently to celebrate Django's 20th birthday with Adrian Holovaty, Will Vincent, Jeff Triplet, and Thibaud Colas. We didn’t know that it was a web framework. We thought it was a tool for building local newspaper websites. [...] Django’s original tagline was ‘Web development on journalism deadlines’. That’s always been my favorite description of the project. Tags: django, podcast-appearances…

Read More

Happy 20th birthday Django! Here's my talk on Django Origins from Django's 10th

July 13, 2025 » Simon Willison's Weblog: django » [Archived Version]

Today is the 20th anniversary of the first commit to the public Django repository! Ten years ago we threw a multi-day 10th birthday party for Django back in its birthtown of Lawrence, Kansas. As a personal celebration of the 20th, I'm revisiting the talk I gave at that event and writing it up here. Here's the YouTube video. Below is a full transcript, plus my slides and some present-day annotations. Django Origins (and some things I have built with Django) Presented 11th July 2015 at Django…

Read More

Quoting Django’s security policies

July 11, 2025 » Simon Willison's Weblog: django » [Archived Version]

Following the widespread availability of large language models (LLMs), the Django Security Team has received a growing number of security reports generated partially or entirely using such tools. Many of these contain inaccurate, misleading, or fictitious content. While AI tools can help draft or analyze reports, they must not replace human understanding and review. If you use AI tools to help prepare a report, you must: Disclose which AI tools were used and specify what they were used for (an…

Read More

PR #537: Fix Markdown in og descriptions

June 3, 2025 » Simon Willison's Weblog: django » [Archived Version]

PR #537: Fix Markdown in og descriptions Since OpenAI Codex is now available to us ChatGPT Plus subscribers I decided to try it out against my blog. It's a very nice implementation of the GitHub-connected coding "agent" pattern, as also seen in Google's Jules and Microsoft's Copilot Coding Agent. First I had to configure an environment for it. My Django blog uses PostgreSQL which isn't part of the default Codex container, so I had Claude Sonnet 4 help me come up with a startup recipe to get Pos…

Read More

django-simple-deploy

May 17, 2025 » Simon Willison's Weblog: django » [Archived Version]

django-simple-deploy Eric Matthes presented a lightning talk about this project at PyCon US this morning. "Django has a deploy command now". You can run it like this: pip install django-simple-deploy[fly_io] # Add django_simple_deploy to INSTALLED_APPS. python manage.py deploy --automate-all It's plugin-based (inspired by Datasette!) and the project has stable plugins for three hosting platforms: dsd-flyio, dsd-heroku and dsd-platformsh. Currently in development: dsd-vps - a plugin that should…

Read More

Django: what’s new in 5.2

April 10, 2025 » Simon Willison's Weblog: django » [Archived Version]

Django: what’s new in 5.2 Adam Johnson provides extremely detailed unofficial annotated release notes for the latest Django. I found his explanation and example of Form BoundField customization particularly useful - here's the new pattern for customizing the class= attribute on the label associated with a CharField: from django import forms class WideLabelBoundField(forms.BoundField): def label_tag(self, contents=None, attrs=None, label_suffix=None): if attrs is None: …

Read More

Composite primary keys in Django

April 2, 2025 » Simon Willison's Weblog: django » [Archived Version]

Composite primary keys in Django Django 5.2 is out today and a big new feature is composite primary keys, which can now be defined like this: class Release(models.Model): pk = models.CompositePrimaryKey( "version", "name" ) version = models.IntegerField() name = models.CharField(max_length=20) They don't yet work with the Django admin or as targets for foreign keys. Other smaller new features include: All ORM models are now automatically imported into ./manage.py shell…

Read More

suitenumerique/docs

March 17, 2025 » Simon Willison's Weblog: django » [Archived Version]

suitenumerique/docs New open source (MIT licensed) collaborative text editing web application, similar to Google Docs or Notion, notable because it's a joint effort funded by the French and German governments and "currently onboarding the Netherlands". It's built using Django and React: Docs is built on top of Django Rest Framework, Next.js, BlockNote.js, HocusPocus and Yjs. Deployments currently require Kubernetes, PostgreSQL, memcached, an S3 bucket (or compatible) and an OIDC provider. …

Read More

Smoke test your Django admin site

March 13, 2025 » Simon Willison's Weblog: django » [Archived Version]

Smoke test your Django admin site Justin Duke demonstrates a neat pattern for running simple tests against your internal Django admin site: introspect every admin route via django.urls.get_resolver() and loop through them with @pytest.mark.parametrize to check they all return a 200 HTTP status code. This catches simple mistakes with the admin configuration that trigger exceptions that might otherwise go undetected. I rarely write automated tests against my own admin sites and often feel guilty …

Read More

My approach to running a link blog

Dec. 22, 2024 » Simon Willison's Weblog: django » [Archived Version]

I started running a basic link blog on this domain back in November 2003 - publishing links (which I called "blogmarks") with a title, URL, short snippet of commentary and a "via" link where appropriate. So far I've published 7,607 link blog posts and counting. In April of this year I finally upgraded my link blog to support Markdown, allowing me to expand my link blog into something with a lot more room. The way I use my link blog has evolved substantially in the eight months since then. I'm g…

Read More