Skip to content

Instantly share code, notes, and snippets.

@albertsun
Created February 12, 2012 21:33
Show Gist options
  • Save albertsun/1810948 to your computer and use it in GitHub Desktop.
Save albertsun/1810948 to your computer and use it in GitHub Desktop.
management command
from django.core.management.base import NoArgsCommand, CommandError
from django.core import management
class Command(NoArgsCommand):
help="Run a command"
def get_version(self):
return "0.1"
def handle_noargs(self, **options):
print "Running a command"
"""do some stuff here"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment