Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #18019 -- Use threaded runserver only when database supports it.

  • Loading branch information...
commit bb4452f212e211bca7b6b57904d59270ffd7a503 1 parent fcb09b5
Claude Paroz authored May 15, 2012
9  django/core/management/commands/testserver.py
@@ -35,4 +35,11 @@ def handle(self, *fixture_labels, **options):
35 35
         # a strange error -- it causes this handle() method to be called
36 36
         # multiple times.
37 37
         shutdown_message = '\nServer stopped.\nNote that the test database, %r, has not been deleted. You can explore it on your own.' % db_name
38  
-        call_command('runserver', addrport=addrport, shutdown_message=shutdown_message, use_reloader=False, use_ipv6=options['use_ipv6'])
  38
+        use_threading = connection.features.test_db_allows_multiple_connections
  39
+        call_command('runserver',
  40
+            addrport=addrport,
  41
+            shutdown_message=shutdown_message,
  42
+            use_reloader=False,
  43
+            use_ipv6=options['use_ipv6'],
  44
+            use_threading=use_threading
  45
+        )

0 notes on commit bb4452f

Please sign in to comment.
Something went wrong with that request. Please try again.