#9167: shutdown_message option missing in runserver.py
---------------------------+------------------------------------------------
 Reporter:  jjackson       |       Owner:  nobody    
   Status:  new            |   Milestone:  post-1.0  
Component:  Uncategorized  |     Version:  1.0       
 Keywords:                 |       Stage:  Unreviewed
Has_patch:  0              |  
---------------------------+------------------------------------------------
 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'>
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9167>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to