{"id":23563,"library":"django-click","title":"django-click","description":"Build Django management commands using the click CLI package. Version 2.5.0; supports Python >=3.10 and Django up to 6.0. Release cadence: infrequent, driven by compatibility updates.","status":"active","version":"2.5.0","language":"python","source_language":"en","source_url":"https://github.com/django-commons/django-click","tags":["django","click","management-commands","cli"],"install":[{"cmd":"pip install django-click","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Required: Django management command framework.","package":"django","optional":false},{"reason":"Required: CLI library used to define commands.","package":"click","optional":false}],"imports":[{"note":"In older versions, command was in a submodule; now directly in django_click.","wrong":"from django_click.decorators import command","symbol":"command","correct":"from django_click import command"},{"note":"","wrong":null,"symbol":"pass_verbosity","correct":"from django_click import pass_verbosity"},{"note":"","wrong":null,"symbol":"Groupable","correct":"from django_click import Groupable"}],"quickstart":{"code":"# my_app/management/commands/hello.py\nfrom django.core.management.base import BaseCommand\nfrom django_click import command\nimport click\n\n@command(BaseCommand)\n@click.option('--name', default='World')\ndef hello(name):\n    click.echo(f'Hello {name}')\n","lang":"python","description":"Create a Django management command named 'hello' using click decorators."},"warnings":[{"fix":"Upgrade Python to >=3.10 and Django to >=4.2, then install django-click 2.5.0.","message":"Django-click 2.5.0 drops support for Python <3.10 and Django <4.2. Upgrade your environment if using older versions.","severity":"breaking","affected_versions":"<2.5.0"},{"fix":"Ensure the function name matches the command name (e.g., 'def my_command(...)').","message":"Commands must be decorated with @command(BaseCommand) and the function name must be all lowercase, as it becomes the management command name.","severity":"gotcha","affected_versions":"all"},{"fix":"Change 'from django_click.decorators import command' to 'from django_click import command'.","message":"The 'django_click.decorators' module is deprecated; import directly from 'django_click'.","severity":"deprecated","affected_versions":">=2.3.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install django-click'.","cause":"django-click is not installed.","error":"ModuleNotFoundError: No module named 'django_click'"},{"fix":"Use 'from django_click import command'.","cause":"Old import path from django_click.decorators; the symbol moved to django_click.","error":"ImportError: cannot import name 'command' from 'django_click'"},{"fix":"Decorate with @command(BaseCommand) where BaseCommand is imported from django.core.management.base.","cause":"The @command decorator requires a BaseCommand subclass as first argument.","error":"TypeError: command() missing 1 required positional argument: 'cls'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}