Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #12619 -- Added support for the --noinput flag to testserver. T…

…hanks to clouserw for the suggestion, and darkrho for the patch.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 6ab3fea commit 0dce7b69210ed9fa60aa4eb1b4a8a571f23315c1 @freakboy3742 freakboy3742 committed
5 django/core/management/commands/
@@ -4,6 +4,8 @@
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
+ make_option('--noinput', action='store_false', dest='interactive', default=True,
+ help='Tells Django to NOT prompt the user for input of any kind.'),
make_option('--addrport', action='store', dest='addrport',
type='string', default='',
help='port number or ipaddr:port to run the server on'),
@@ -18,10 +20,11 @@ def handle(self, *fixture_labels, **options):
from django.db import connection
verbosity = int(options.get('verbosity', 1))
+ interactive = options.get('interactive', True)
addrport = options.get('addrport')
# Create a test database.
- db_name = connection.creation.create_test_db(verbosity=verbosity)
+ db_name = connection.creation.create_test_db(verbosity=verbosity, autoclobber=not interactive)
# Import the fixture data into the test database.
call_command('loaddata', *fixture_labels, **{'verbosity': verbosity})
7 docs/ref/django-admin.txt
@@ -804,8 +804,6 @@ with an appropriate extension (e.g. ``json`` or ``xml``). See the
documentation for ``loaddata`` for details on the specification of fixture
data files.
The :djadminopt:`--noinput` option may be provided to suppress all user
@@ -889,6 +887,11 @@ To run on with a ``test`` fixture:: testserver --addrport test
+.. versionadded:: 1.3
+The :djadminopt:`--noinput` option may be provided to suppress all user

0 comments on commit 0dce7b6

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