Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import atexit
- from django.core.management.commands.runserver import BaseRunserverCommand
- class NewRunserverCommand(BaseRunserverCommand):
- def __init__(self, *args, **kwargs):
- atexit.register(self.exit)
- super(Command, self).__init__(*args, **kwargs)
- def exit(self):
- for process in PROCESSES_TO_KILL:
- process.terminate()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement