Advertisement
Guest User

Untitled

a guest
Apr 25th, 2015
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import atexit
  2. from django.core.management.commands.runserver import BaseRunserverCommand
  3.  
  4. class NewRunserverCommand(BaseRunserverCommand):
  5. def __init__(self, *args, **kwargs):
  6. atexit.register(self.exit)
  7. super(Command, self).__init__(*args, **kwargs)
  8.  
  9. def exit(self):
  10. for process in PROCESSES_TO_KILL:
  11. process.terminate()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement