On this page
article
Django Management Command
Create a custom manage.py command.
Category: django
Problem
Create a custom manage.py command.
Solution
class Command(BaseCommand):
def handle(self, *args, **options):
self.stdout.write('Done')
Notes
- Adapt variable names and paths to your project
- Add error handling for production use
- See related chapters in the Learning Path