diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-05-06 03:29:22 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-05-06 03:29:22 +0000 |
| commit | 058ab898b0bd22ad6c9af106400a20fa9ee74b53 (patch) | |
| tree | e46dd5b877565dfee13d3dce5c0cfa2302f47e18 | |
| parent | eb4bbbb6f3346f49b25930ef6a32ce0a7b1ae3ec (diff) | |
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
| -rw-r--r-- | django/core/management.py | 3 |
1 files changed, 2 insertions, 1 deletions
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: |
