dmr-from-django-ninja

Migrate Django Ninja transport layers to django-modern-rest while preserving routes and contracts.

1.3k|150|Updated Oct 9, 2025
One-click install
npx skills add https://github.com/wemake-services/django-modern-rest --skill dmr-from-django-ninja
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dmr-from-django-ninja
Source: https://github.com/wemake-services/django-modern-rest/tree/main/.agents/skills/dmr-from-django-ninja
Command: npx skills add https://github.com/wemake-services/django-modern-rest --skill dmr-from-django-ninja

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Migrate Django Ninja / ninja-extra transport layer to django-modern-rest incrementally while preserving routes, request/response contracts, auth, throttling, and test coverage. Use when replacing NinjaExtraAPI/api_controller/http_* handlers/ninja.Schema with dmr controllers/routers and typed DTOs.

Core Features & Use Cases

  • Provides a guided migration workflow to map Ninja constructs to DMR equivalents, preserving observable contracts and enabling incremental rollout across project slices.
  • Ensures compatibility of routes, schemas, status codes, headers, and authentication, with explicit drift handling and test updates.
  • Useful for projects transitioning from django-ninja to django-modern-rest without rewriting core business logic.

Quick Start

Run a migration slice against your Django project using the DMR from django-ninja tool to begin converting Ninja transport to DMR adapters.

Frequently Asked Questions about dmr-from-django-ninja

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate django-ninja API controllers to django-modern-rest?

Migrate django-ninja by mapping api_controller and http_* handlers to DMR routers and typed DTOs. The tool translates transport constructs while preserving routes, schemas, and authentication for incremental project rollout.

Can I preserve authentication and throttling when moving ninja-extra to DMR?

Yes, migrating ninja-extra to DMR preserves authentication and throttling configurations. The process enforces strict parity for routes, request/response contracts, and headers, ensuring your existing security and rate-limiting behavior remains intact.

What is the best way to convert Ninja schemas to DMR DTOs incrementally?

Converting Ninja schemas to DMR DTOs incrementally involves applying migration slices across your project. This approach maps schemas to typed DTOs while guiding test coverage and handling any drift explicitly to maintain compatibility.

Does migrating from django-ninja to django-modern-rest require rewriting business logic?

Migrating from django-ninja to django-modern-rest does not require rewriting core business logic. The tool focuses on replacing the transport layer by translating Ninja constructs to DMR components, allowing you to transition safely without altering underlying operations.

How does drift handling work when replacing ninja.Schema with DMR DTOs?

Drift handling when replacing ninja.Schema with DMR DTOs enforces strict parity unless explicitly approved. The migration process identifies compatibility gaps in status codes and headers, guiding test updates to resolve any deviations safely.