call_command('runserver') executes management command twice.
|Reported by:||Eric Holscher||Owned by:|
|Component:||Core (Management commands)||Version:||master|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When you use runserver in a management command, it executes the code in the management command twice. This is cited in the testserver management command:
32 # Run the development server. Turn off auto-reloading because it causes 33 # a strange error -- it causes this handle() method to be called 34 # multiple times. 35 shutdown_message = '\nServer stopped.\nNote that the test database, %r, has not been deleted. You can explore it on your own.' % db_name 36 call_command('runserver', addrport=addrport, shutdown_message=shutdown_message, use_reloader=False)
I ran into this as well, and I'm just putting it in here so hopefully someone sees it and fixes it.
Change History (13)
comment:1 Changed 8 years ago by
|Component:||Uncategorized → django-admin.py runserver|
|Owner:||changed from nobody to Eric Holscher|
|Patch needs improvement:||unset|
|Status:||new → assigned|