Skip to content

Commit

Permalink
Improved runserver to display 'CONTROL-C' vs. 'CTRL-BREAK' based on t…
Browse files Browse the repository at this point in the history
…he current platform

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2852 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
adrianholovaty committed May 6, 2006
1 parent eb4bbbb commit 058ab89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion django/core/management.py
Expand Up @@ -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:
Expand Down

0 comments on commit 058ab89

Please sign in to comment.