Skip to main content

A reusable blog app powered by Python, Django, DRF, Wagtail CMS, TailwindCSS and DaisyUI.

Project description

django-w-blog

CI CD Code Style: Black Code Linting: Ruff Docker Image Docker Publish PyPI - Version PyPI - Python Version PyPI - Downloads PyPI - License

Overview

A reusable, production-ready blog application built with Python, Django, Django REST Framework, and Wagtail CMS, styled with Tailwind CSS and daisyUI. It ships with sane defaults, modern theming, and clean APIs to help you launch quickly and scale confidently.


Key features

  • Full CMS: Wagtail-powered editorial experience with pages, media, search, and governance.
  • Modern UI: Tailwind CSS for utility-first styling and responsive layouts.
  • Theming: All daisyUI themes supported, plus the ability to define custom themes.
  • API ready: Optional REST API endpoints for content delivery and integrations.
  • CI/CD: GitHub Actions pipelines for consistent, automated testing and deployment.
  • Dependencies: Managed with Poetry for reproducibility and clarity.
  • Formatting: Black for automatic, consistent code formatting.
  • Linting: Ruff for fast, comprehensive linting.
  • Testing: Django test runner for unit and integration tests.
  • Configs included: .gitignore, pyproject.toml, and other boilerplate to streamline setup.

Installation

pip install django-w-blog

Configuration

Add installed apps

# project/settings.py

INSTALLED_APPS = [
    "blog",
    "blog.api",  # Optional if you don't need the API
    "blog.apps.articles",
    "blog.apps.categories",
    "blog.apps.home",      # Optional if your project includes a Home model ('home.Home')
    "blog.apps.indexes",
    "blog.apps.tags",
    "blog.cms",
    "blog.ui",

    # Dependencies
    "rest_wind",           # Optional if you don't need the API
    "rest_framework",      # Optional if you don't need the API
    "wagtail.contrib.search_promotions",
    "wagtail.contrib.forms",
    "wagtail.contrib.redirects",
    "wagtail.embeds",
    "wagtail.sites",
    "wagtail.users",
    "wagtail.snippets",
    "wagtail.documents",
    "wagtail.images",
    "wagtail.search",
    "wagtail.admin",
    "wagtail",
    "modelcluster",
    "taggit",
    # ...
]

Run migrations

# In your project root
python manage.py migrate

Update URL configuration

# project/urls.py

from django.urls import include, path
from wagtail import urls as wagtail_urls
from wagtail.admin import urls as wagtailadmin_urls
from wagtail.documents import urls as wagtaildocs_urls

urlpatterns = [
    path("", include("blog.ui.urls")),
    path("api/", include("blog.api.urls")),           # Optional if you don't need the API
    path("api/", include("rest_framework.urls")),     # Optional if you don't need the API
    # ...
    path("documents/", include(wagtaildocs_urls)),
    path("dashboard/", include(wagtailadmin_urls)),
    path("", include(wagtail_urls)),                  # Keep this as the last pattern
]

Theming and templates

Each template in django-w-blog extends docs/base.html. Start by creating this base template in your project and customize it to match your brand.

Create the docs template directory

mkdir -p your_app/templates/docs

Create the base template

touch your_app/templates/docs/base.html

You can extend docs/base.html in your own templates or override any provided template for full control.

Available blocks and context

  • docs/base.html

    • Blocks:
      • theme: Default daisyUI theme
      • toggle_theme: Secondary daisyUI theme
      • head: HTML head content
      • title: Page title
      • styles: CSS styles links
      • navbar: Navigation bar
      • branding: Branding in navbar
      • navbar_center: Centered navbar links
      • navbar_end: Right-aligned navbar links
      • content: Main content
      • footer: Page footer
      • drawer_branding: Sidebar branding
      • drawer_content: Sidebar content
    • Context:
      • home: Site root page
  • docs/index.html

    • Blocks: All blocks from docs/base.html
    • Context:
      • index: Blog index page
      • articles: Latest blog articles
  • docs/category.html

    • Blocks: All blocks from docs/base.html
    • Context:
      • category: Category instance
  • docs/article.html

    • Blocks: All blocks from docs/base.html
    • Context:
      • article: Article instance
  • docs/search.html

    • Blocks: All blocks from docs/base.html
    • Context:
      • search_results: Results as a PageQuerySet

Contributing

We welcome contributions. Please review the CONTRIBUTING guide for setup, coding standards, and workflow. Opening an issue before major changes helps align on scope and direction.


Support

For questions, bug reports, or feature requests, open an issue or start a thread in GitHub Discussions.


License

This project is available under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_w_blog-0.1.3.tar.gz (49.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_w_blog-0.1.3-py3-none-any.whl (72.9 kB view details)

Uploaded Python 3

File details

Details for the file django_w_blog-0.1.3.tar.gz.

File metadata

  • Download URL: django_w_blog-0.1.3.tar.gz
  • Upload date:
  • Size: 49.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.13.7 Windows/11

File hashes

Hashes for django_w_blog-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7b71c5b5f42a834063fd2371143037fb40a5ba8f0758806c8f9093d7fece0299
MD5 7dfc2488fcb266d7ffb9384ebe0dceab
BLAKE2b-256 0691b4cc9e0bf0a1fba716143388a6e2a3359d3561d4354b0787dedb26fbca60

See more details on using hashes here.

File details

Details for the file django_w_blog-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: django_w_blog-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 72.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.13.7 Windows/11

File hashes

Hashes for django_w_blog-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c6625b3088c42161747a0973dbb838d483c003afd68d843c28995465ff73e185
MD5 9af02a5a2e1645d203b25f3c304f9606
BLAKE2b-256 5ada57471efeda493c7424e38fec1135adce736cdde65b01e4839fb3823b8527

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page