{"id":23569,"library":"django-decorator-include","title":"django-decorator-include","description":"Include Django URL patterns with decorators. Version 3.3, supports Django 3.0+ and Python >=3.6. Release cadence is low (stable, maintained).","status":"active","version":"3.3","language":"python","source_language":"en","source_url":"https://github.com/twidi/django-decorator-include","tags":["django","url","decorator","include","routing"],"install":[{"cmd":"pip install django-decorator-include","lang":"bash","label":"pip"}],"dependencies":[{"reason":"Major dependency for URL routing","package":"Django","optional":false}],"imports":[{"note":"Wrong because the package is installed as decorator_include, not django_decorator_include.","wrong":"from django_decorator_include import decorator_include","symbol":"decorator_include","correct":"from decorator_include import decorator_include"}],"quickstart":{"code":"from django.urls import path, include\nfrom django.contrib.auth.decorators import login_required\nfrom decorator_include import decorator_include\n\nurlpatterns = [\n    path('private/', decorator_include(login_required, include('private_app.urls'))),\n]","lang":"python","description":"Include a set of URL patterns wrapped with a decorator (e.g., login_required)."},"warnings":[{"fix":"Use a decorator that works on view functions, e.g., login_required, not a middleware.","message":"The decorator is applied to each view function in the included URL patterns, not to the path itself. Ensure decorators are callable and compatible with the view signatures.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade Django to >=3.0 or use django-decorator-include <3.0.","message":"Django 3.0+ required; older Django versions (2.x) are not supported from version 3.0 of this library.","severity":"deprecated","affected_versions":">=3.0"},{"fix":"Change `from django_decorator_include import decorator_include` to `from decorator_include import decorator_include`.","message":"In version 3.0, the import path changed from `django_decorator_include` to `decorator_include`.","severity":"breaking","affected_versions":">=3.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `from decorator_include import decorator_include` instead.","cause":"Using the old import path after upgrading to v3.0+.","error":"ImportError: No module named 'django_decorator_include'"},{"fix":"Use `decorator_include(decorator, include('app.urls'))` rather than `decorator_include(decorator, path(...))`.","cause":"Passing a URL pattern directly without wrapping in `include()`.","error":"TypeError: decorator_include() got multiple values for argument 'view'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}