--- id: django-decorator-include version: "3.5" license: BSD-2-Clause license_treatment: permissive maintenance: active --- # django-decorator-include — Include Django URL patterns with decorators License: permissive · Maintenance: active · Downloads: 189.5K/mo ## What it is and what it does django-decorator-include is a utility that extends Django's URL routing to apply decorators to entire included URL configurations at once. Instead of decorating individual views, you pass one or more decorators alongside the URL module you want to include, and all views in that module inherit those decorators in the order you specify. It's useful when you have a set of related views that all need the same protection or behavior—such as a login requirement or permission check—without decorating each view individually. The package depends only on Django and importlib_metadata, has no known vulnerabilities, and supports Django versions from 2.2 through 6.1. Use it for: - Protect an entire section of your site by wrapping its URL include with login_required and permission decorators. - Apply custom authentication logic to a group of endpoints without repeating the decorator on every view. - Enforce role-based access control on a module of views by stacking multiple permission-check decorators in one include. - Add request logging or rate-limiting to a subsection of your URL configuration by including it with a custom decorator. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Applies decorators to Django URL patterns included from other modules, letting you wrap entire URL configurations with authentication, permission checks, or other logic. Yes. This is a lightweight, actively maintained utility that solves a real Django routing problem with no security vulnerabilities, permissive licensing, and low install friction. Use it when you have groups of views that need the same decorator logic. ## Install pip install django-decorator-include uv add django-decorator-include poetry add django-decorator-include ## Installing django-decorator-include Before you install: Installs with minimal friction—only Django and importlib_metadata as runtime dependencies. Actively maintained with a recent release; repository shows steady activity. License in practice: BSD-2-Clause is permissive; you can use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions. Quickstart: pip install django-decorator-include from django.urls import path from django.contrib.auth.decorators import login_required urlpatterns = [ path('secret/', include_with_decorators(login_required, 'myapp.urls')), ] Verify before relying: - Whether the package works with all listed Django versions (2.2 through 6.1) without additional setup or configuration. ## Package facts - License: BSD-2-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 189.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django url decorators, apply decorators to django urls, django url pattern wrapping, django include with decorators, django view decorators bulk apply, django-urls, decorators [View on SkillFed](https://skillfed.io/packages/django-decorator-include) · [View on PyPI](https://pypi.org/project/django-decorator-include/)