Skip to content

Commit

Permalink
Fixed django#18019 -- Use threaded runserver only when database suppo…
Browse files Browse the repository at this point in the history
…rts it.
  • Loading branch information
claudep committed May 15, 2012
1 parent fcb09b5 commit bb4452f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion django/core/management/commands/testserver.py
Expand Up @@ -35,4 +35,11 @@ def handle(self, *fixture_labels, **options):
# a strange error -- it causes this handle() method to be called
# multiple times.
shutdown_message = '\nServer stopped.\nNote that the test database, %r, has not been deleted. You can explore it on your own.' % db_name
call_command('runserver', addrport=addrport, shutdown_message=shutdown_message, use_reloader=False, use_ipv6=options['use_ipv6'])
use_threading = connection.features.test_db_allows_multiple_connections
call_command('runserver',
addrport=addrport,
shutdown_message=shutdown_message,
use_reloader=False,
use_ipv6=options['use_ipv6'],
use_threading=use_threading
)

0 comments on commit bb4452f

Please sign in to comment.