From 058ab898b0bd22ad6c9af106400a20fa9ee74b53 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sat, 6 May 2006 03:29:22 +0000 Subject: [PATCH] Improved runserver to display 'CONTROL-C' vs. 'CTRL-BREAK' based on the current platform git-svn-id: http://code.djangoproject.com/svn/django/trunk@2852 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/management.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django/core/management.py b/django/core/management.py index 90da969f42..93b1c7b5b5 100644 --- a/django/core/management.py +++ b/django/core/management.py @@ -970,13 +970,14 @@ def runserver(addr, port): if not port.isdigit(): sys.stderr.write(style.ERROR("Error: %r is not a valid port number.\n" % port)) sys.exit(1) + quit_command = sys.platform == 'win32' and 'CTRL-BREAK' or 'CONTROL-C' def inner_run(): from django.conf import settings print "Validating models..." validate() print "\nDjango version %s, using settings %r" % (get_version(), settings.SETTINGS_MODULE) print "Development server is running at http://%s:%s/" % (addr, port) - print "Quit the server with CONTROL-C (Unix) or CTRL-BREAK (Windows)." + print "Quit the server with %s." % quit_command try: run(addr, int(port), AdminMediaHandler(WSGIHandler())) except WSGIServerException, e: