Headless Wagtail CMS: Serializing ForeignKeys on Wagtail Pages

This video features kalobtaulien at Wagtail Space 2026 .

Headless Wagtail CMS: Serializing ForeignKeys on Wagtail Pages
0:10:02
Published November 29, 2023
1,887 views

Tutorial: https://learnwagtail.com/tutorials/headless-cms-serializing-foreign-keys/
Wagtail for Beginners Course: https://learnwagtail.com/wagtail-for-beginners/

In this video we'll change the default ForeignKey information that's provided by Wagtails v2 API to something a little more useful. The idea is to make less API requests from your headless application, and to provide more useful data on the initial request.

ForeignKey's a wildly helpful feature in Django and Wagtail. But in our Wagtail v2 API we're provided with a couple meta fields, the page id, and the page title. But what if we want more (or less)? That's when custom serialization comes in.

For more free tutorials: https://learnwagtail.com/tutorials/
Don't forget to subscribe to this channel and follow me on Twitter at https://twitter.com/kalobtaulien

Git Commit: https://github.com/CodingForEverybody/learn-wagtail/commit/3465f281ed9526c140308fe7d6c0621aac24b24d

#Wagtail #Django #Python

Presenters

Note: We understand that names change, people change, and bodies change. We respect each individual's journey and privacy. If you have any concerns about a video or need us to remove content, please don't hesitate to contact us. We will handle your request with care and promptly address any issues.

More videos from Wagtail Space