﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
9167	shutdown_message option missing in runserver.py	jjackson	nobody	"Changeset 5911 added a shutdown_message option in runserver.py, but it was never fully implemented. In Ticket #8085, you can see it being used, but it doesn't work because the option isn't included using 'make_option'. Running in 1.0:

{{{
LosOlivos: $ python -u mysite/manage.py runserver --noreload --shutdown_message 'Shutdown message for server.' 
Usage: mysite/manage.py runserver [options] [optional port number, or ipaddr:port]

Starts a lightweight Web server for development.

mysite/manage.py: error: no such option: --shutdown_message
Exception: <type 'exceptions.SystemExit'>
}}}


What's missing is the last make_option shown in this code:

{{{
class Command(BaseCommand):
    option_list = BaseCommand.option_list + (
        make_option('--noreload', action='store_false', dest='use_reloader', default=True,
            help='Tells Django to NOT use the auto-reloader.'),
        make_option('--adminmedia', dest='admin_media_path', default='',
            help='Specifies the directory from which to serve admin media.'),
        make_option('--shutdown_message', dest='shutdown_message', default='',
            help='Specifies a message displayed when shutting down the server.'),
    )

}}}

One thing I'm not sure about is what to do when the message is printed, as the message may need a '\n' before it. What I got was this, with the Control-C and the message run together:

{{{
LosOlivos: $ python -u mysite/manage.py runserver --noreload --shutdown_message 'Shutdown message for server.' 
Validating models...
0 errors found

Django version 1.0-final-SVN-unknown, using settings 'mysite.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
^CShutdown message for server.
Exception: <type 'exceptions.SystemExit'>
}}}
"		closed	django-admin.py runserver	1.0		wontfix		jjackson@…	Accepted	1	0	1	0	0	0
