Browse files

Improved runserver to display 'CONTROL-C' vs. 'CTRL-BREAK' based on t…

…he current platform

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent eb4bbbb commit 058ab898b0bd22ad6c9af106400a20fa9ee74b53 @adrianholovaty adrianholovaty committed May 6, 2006
Showing with 2 additions and 1 deletion.
  1. +2 −1 django/core/
@@ -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))
+ quit_command = sys.platform == 'win32' and 'CTRL-BREAK' or 'CONTROL-C'
def inner_run():
from django.conf import settings
print "Validating models..."
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
run(addr, int(port), AdminMediaHandler(WSGIHandler()))
except WSGIServerException, e:

0 comments on commit 058ab89

Please sign in to comment.