Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.4.x] Fixed #18019 -- Use threaded runserver only when database sup…

…ports it.
  • Loading branch information...
commit 6bb85d98b0574aec1aec9fb97c26ce16bc060522 1 parent 589af49
@claudep claudep authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 django/core/management/commands/testserver.py
View
9 django/core/management/commands/testserver.py
@@ -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
+ )
Please sign in to comment.
Something went wrong with that request. Please try again.