diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-05-15 09:18:16 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-05-15 09:21:10 +0200 |
| commit | bb4452f212e211bca7b6b57904d59270ffd7a503 (patch) | |
| tree | d6f507e9a74e5fbdf4183bad008b27ab75846a1f | |
| parent | fcb09b5746192fea1b672346c915ee11e4120d7e (diff) | |
Fixed #18019 -- Use threaded runserver only when database supports it.
| -rw-r--r-- | django/core/management/commands/testserver.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/django/core/management/commands/testserver.py b/django/core/management/commands/testserver.py index 2e0d8e426d..97fc8ea8e1 100644 --- a/django/core/management/commands/testserver.py +++ b/django/core/management/commands/testserver.py @@ -35,4 +35,11 @@ class Command(BaseCommand): # 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 + ) |
