Blog
The boilerplate includes a built-in Django blog so you can publish launch content and SEO pages without adding a separate CMS before launch.
What ships with the boilerplate
- a public blog list page
- blog detail pages
- a TinyMCE-powered editor in Django admin
- draft and publish controls
- featured-post support
- a related-post population script
- an authenticated create API for external workflows
Writing posts in Django admin
Log in to the admin and open the Blog section. The editor uses TinyMCE, so you can write rich content without editing raw HTML for every post.
The most important fields are:
title: the public title of the articleslug: the URL slug; if you leave it blank, the model generates one from the titlecover_image_url: the article hero image URLmeta_desc: the SEO description; if left blank, the model generates one from the contentcategory: a content category such asguideorcase-studyis_featured: pins a post toward the top of the listingis_public: controls whether the post is published
Publishing behavior
Only posts with is_public=True appear on the public blog. Drafts stay hidden until you publish them.
The public list view orders posts with featured content first and then sorts by recent updates.
Blog create API
The boilerplate exposes an authenticated create endpoint at:
/blog/api/create/
The underlying serializer accepts:
cover_image_urltitlecategorycontentslugmeta_descpublication_dateis_public
The API requires authentication. The default DRF configuration uses token authentication, so plan on sending a token if you create posts from an external system.
Suggested workflow
For most teams, the cleanest launch workflow is:
- draft and review posts in Django admin
- publish with
is_public=True - use the API only when you have an external editorial workflow that truly needs it
Populate related posts
The boilerplate includes a helper that calculates related blog posts for you. Run it after you have a meaningful set of published articles:
python manage.py populate_related_blogs
That command calls the related-post utility in blog/utils/populate_related_blogs.py.
If you want the background on how the helper works, read How to Programmatically Populate Related Blogs in Django.