返回文章列表文章索引阅读全文
STARBLOG / 阅读手记
Django

Sharing Some Interesting Modern Django Ecosystem Components for 2026

It's 2026. If you're still putting up with Stone Age templates and redundant CRUD, maybe it's time for a career change. Cotton and Inertia have finally given this old relic Django a new lease on life, and tools like Ninja are now the baseline for passing-grade development. Take a look at these modern components—stop torturing your aesthetic sense with that self-congratulatory inefficient code.

曦远 (DealiAxy)约 18 分钟
目录15 个章节

Preface

These past few days I've been intensely developing the DjangoStarter project, and along the way I've also found some issues, such as inconsistent UI style, architecture, testing problems, and so on.

While browsing GitHub, I discovered some new stuff in the Django ecosystem.

This article is a brief share.

New stuff

django-cotton

Bringing component-based design to django templates

https://django-cotton.com/

Completely changing how templates are written

A "completion plan" for Django's native Template system.

In the past, Django templates achieved reuse through {% include %} or {% block %}, with clunky syntax that made it hard to pass complex data.

  • Core value: Introduces a <c-component> tag syntax similar to Vue/React.
  • What's modern: Supports attribute passing, slots (Slots), and component scope, giving traditional .html templates the development feel of a component-based framework.

copier

A library and CLI app for rendering project templates.

https://copier.readthedocs.io/en/stable/

A better project scaffolding tool

Although it's not Django-specific, it's rapidly replacing the old cookiecutter in the Django community.

  • Core value: Supports template updates. In the past, after generating a project with cookiecutter, if the scaffolding was upgraded, it was hard to sync those updates to existing projects. Copier solves this with intelligent diffs.
  • Django connection: Many modern Django boilerplate projects (such as the successors of the famous Cookiecutter Django) have started switching to Copier.
  • Later I could also use this tool as the scaffolding for DjangoStarter

Inertia.js

Build frontend experiences with the backend you love.

Develop React, Vue, and Svelte SPAs with the elegance of server-side routing. Plug and play with any backend, meticulously optimized for Laravel. No API required.

https://inertiajs.com/

https://github.com/inertiajs/inertia-django

Inertia is called "the modern bridge for classic monoliths."

  • Core value: You don't need to write a single line of Django REST Framework code, and you don't need to deal with JWT or CORS. You return responses just like writing traditional Django views, but the frontend can render with React/Vue/Svelte.
  • Current status: After it took off in the Laravel ecosystem, inertia-django became the Django community's go-to solution in 2025 for those who want an SPA experience without the API burden.

shadcn-django

Beautiful, accessible components for Django using Tailwind CSS and Alpine.js. Open source. Customizable.

https://shadcn-django.com/

Inspired by shadcn/ui in the frontend world, it brings Django developers a component experience where you can "copy the source code directly."

Core value: Combines Tailwind CSS and Alpine.js. It's not a bloated third-party library, but rather a set of well-designed code snippets that let you quickly build professional-grade admin or SaaS interfaces through Django components (even better when used with Cotton).

Neapolitan

One-click CRUD view generation.

Even with Django Ninja, writing CRUD is still exhausting. Neapolitan is a library developed by a Django core contributor, aimed at solving the problem of "having to write 5 views for a simple CRUD."

  • The black magic: It provides a "declare CRUD in one line of code" pattern. Just define one line in your URLs, and it automatically generates all the views and basic templates for list, detail, create, edit, and delete.
  • What's different: It's not Admin; it's a highly customizable rapid prototyping tool aimed at end users.

Django-Vite

  • Background: Nobody uses the traditional Django Static approach to manage frontend assets anymore.
  • The wow factor: django-vite is currently the standard solution for connecting Django to the modern frontend toolchain (Vite). It supports hot module replacement (HMR), giving you a code-refresh experience measured in seconds during development, and automatically handles hash references at deploy time.

django-watchfiles

  • Background: Native runserver auto-reload is very slow in large projects (especially when the codebase is huge).
  • The wow factor: Through low-level file watching written in Rust, it multiplies Django's reload response speed several times over. In 2026, this is a must-have for developers chasing the ultimate development fluency.

Some I'm already using

Django Ninja

The standard answer for modern APIs, Django's version of FastAPI

  • Core value: It's an API framework based on Python type annotations (Type Hints) and Pydantic.
  • Why you must learn it: It natively supports Async (asynchronous), with performance far surpassing DRF. The coolest part is it comes with automatic Swagger UI generation, making writing APIs as simple as writing ordinary Python functions.

Wagtail CMS

If you're still using native django-admin to edit content, or struggling with outdated CMS systems, it's time to take a look at Wagtail.

  • Core value: It's not a simple plugin, but a professional-grade CMS framework built on top of Django.
  • What's modern: It provides an excellent stream content (StreamField) editing experience and an elegant UI. In 2026 it has become the de facto standard for building highly customizable, high-performance media websites.

Django Extensions

Treasure features:

  • shell_plus: An interactive shell that automatically imports all Models.
  • graph_models: Generate the project's data model relationship diagram (ER diagram) with one click.
  • runserver_plus: Integrates a more powerful debugger.

Django-Action-Triggers

Say goodbye to bloated Signals. If you're tired of Django Signals being hard to debug and difficult to trace, this library is the best alternative.

  • The black magic: It elevates "event triggering" from the code level to the configuration level. You can define via database config or JSON: when a Model undergoes a certain change, automatically trigger a Webhook, send a message, or execute a Task.
  • Use cases: Perfect for building SaaS systems that need highly customizable automated workflows, without repeatedly modifying business logic code.

Viewflow

Complex business finite state machines (FSM), a low-code workflow library

When your Model's state transitions become extremely complex (e.g.: pending payment -> paying -> payment failed -> auto retry -> refund...), simple choice fields and if-else will make your code fall apart.

  • The black magic: It uses declarative programming. You can define a "flowchart" specifying which states can transition, what validations (Permissions) are needed before transitioning, and what actions (Side Effects) to execute after transitioning.
  • Core value: It extracts complex business logic from inside the Model, forming a clear logic layer.

_EOF_

Sharing Some Interesting Modern Django Ecosystem Components for 2026

本文作者:
程序设计实验室
版权声明:
本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!

相关文章

Django中「强行」使用MVVM设计模式

扫盲 首先带大家了解一下什么是MVVM模式: 什么是MVVM?MVVM是Model-View-ViewModel的缩写。 MVVM是MVC的增强版,实质上和MVC没有本质区别,只是代码的位置变动而已 从名字上看,MVVM比MVC架构中多了一个ViewModel,没错,就是这个ViewModel,他是MVVM相对于MVC改进的核心思想。在开发过程中,由于需求的变更或添加,项目的复杂度越来越高,代码量

2021-12-18 · Django · 约 1 分钟

给Django的Admin添加自定义Action-并移除需要选择对象的限制

前言 不得不说,Django的Admin真的给开发带来很多便利,这不,我又来折腾了,这次是添加自定义的action 这个自定义的Action可以看看官方文档的介绍,很详细,不再赘述。 https://docs.djangoproject.com/en/3.0/ref/contrib/admin/actions/ 界面效果 Django默认的添加完action是要选择下面的对象才能提交的,不过我不需

2022-08-26 · Django · 约 1 分钟

讨论

共 0 条

良言一句三冬暖,恶语伤人六月寒。

加载评论中…