~/talk

Django's GeneratedField

Talkat DjangoCon US 2025 · on Monday, 2025-09-08· [django, databases]
slides:none on file

GeneratedField lands in Django 5.0 and computes column values in the database using SQL expressions, with concrete examples on SQLite and PostgreSQL: geometry via GeoDjango (hash, geojson, length km, polygon area), JSON extraction from PyPI metadata, concatenation and JSON object construction, and full‑text vectors with language fallbacks. Migrations show SQL, store vs virtual differs by DB, constraints force immutable expressions, and must refresh_from_db to see updated values; performance tests report milliseconds on 1k–10k packages.

AI-written summary · about

  1. 0:00GeneratedField introduction
  2. 10:15What GeneratedField is
  3. 11:58Area of circle with SQLite
  4. 14:13Item price with quantity
  5. 16:00Traffic light state machine
  6. 19:56PostgreSQL and JSON data
  7. 23:34Names to full names and JSON
  8. 25:44Full text search vectors
  9. 29:22Date range for bookings
  10. 30:27GeoDjango geospatial data
  11. 32:35Line length in routes
  12. 33:18Polygon area for boundaries
  13. 34:01Closing remarks
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.