Skip to content

Instantly share code, notes, and snippets.

@hiway
Created January 22, 2017 12:55
Show Gist options
  • Save hiway/409847a55d1ccd530bd58aa923d6634d to your computer and use it in GitHub Desktop.
Save hiway/409847a55d1ccd530bd58aa923d6634d to your computer and use it in GitHub Desktop.
Boilerplate code for django management command.
from django.core.management.base import BaseCommand, CommandError
class Command(BaseCommand):
help = ''
def handle(self, *args, **options):
try:
pass
except Exception:
raise CommandError('')
self.stdout.write(self.style.SUCCESS(''))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment