Django

Code

Changeset 2852

Show
Ignore:
Timestamp:
05/05/06 22:29:22 (2 years ago)
Author:
adrian
Message:

Improved runserver to display 'CONTROL-C' vs. 'CTRL-BREAK' based on the current platform

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/management.py

    r2845 r2852  
    971971        sys.stderr.write(style.ERROR("Error: %r is not a valid port number.\n" % port)) 
    972972        sys.exit(1) 
     973    quit_command = sys.platform == 'win32' and 'CTRL-BREAK' or 'CONTROL-C' 
    973974    def inner_run(): 
    974975        from django.conf import settings 
     
    977978        print "\nDjango version %s, using settings %r" % (get_version(), settings.SETTINGS_MODULE) 
    978979        print "Development server is running at http://%s:%s/" % (addr, port) 
    979         print "Quit the server with CONTROL-C (Unix) or CTRL-BREAK (Windows)." 
     980        print "Quit the server with %s." % quit_command 
    980981        try: 
    981982            run(addr, int(port), AdminMediaHandler(WSGIHandler()))