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 article
  • slug: the URL slug; if you leave it blank, the model generates one from the title
  • cover_image_url: the article hero image URL
  • meta_desc: the SEO description; if left blank, the model generates one from the content
  • category: a content category such as guide or case-study
  • is_featured: pins a post toward the top of the listing
  • is_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_url
  • title
  • category
  • content
  • slug
  • meta_desc
  • publication_date
  • is_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:

  1. draft and review posts in Django admin
  2. publish with is_public=True
  3. use the API only when you have an external editorial workflow that truly needs it

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.