From 9acd00a72e06c9b327089f12a6160aee4182f98b Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 27 Jan 2011 03:15:12 +0000 Subject: [PATCH] =?UTF-8?q?Fixed=20#15112=20--=20Ensure=20that=20IPv6=20ad?= =?UTF-8?q?dresses=20are=20correctly=20displayed=20in=20the=20admin.=20Tha?= =?UTF-8?q?nks=20to=20oxy=20for=20the=20report,=20and=20=C5=81ukasz=20Reku?= =?UTF-8?q?cki=20for=20the=20test=20case.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://code.djangoproject.com/svn/django/trunk@15343 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/management/commands/runserver.py | 1 + tests/regressiontests/admin_scripts/tests.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/django/core/management/commands/runserver.py b/django/core/management/commands/runserver.py index 55c7869fea..b265740359 100644 --- a/django/core/management/commands/runserver.py +++ b/django/core/management/commands/runserver.py @@ -63,6 +63,7 @@ class BaseRunserverCommand(BaseCommand): raise CommandError('"%s" is not a valid IPv6 address.' % self.addr) if not self.addr: self.addr = self.use_ipv6 and '::1' or '127.0.0.1' + self._raw_ipv6 = bool(self.use_ipv6) self.run(*args, **options) def run(self, *args, **options): diff --git a/tests/regressiontests/admin_scripts/tests.py b/tests/regressiontests/admin_scripts/tests.py index ae37eb3a95..87a6877e04 100644 --- a/tests/regressiontests/admin_scripts/tests.py +++ b/tests/regressiontests/admin_scripts/tests.py @@ -1025,10 +1025,10 @@ class ManageRunserver(AdminScriptTestCase): # IPv6 self.cmd.handle(addrport="", use_ipv6=True) - self.assertServerSettings('::1', '8000', ipv6=True) + self.assertServerSettings('::1', '8000', ipv6=True, raw_ipv6=True) self.cmd.handle(addrport="7000", use_ipv6=True) - self.assertServerSettings('::1', '7000', ipv6=True) + self.assertServerSettings('::1', '7000', ipv6=True, raw_ipv6=True) self.cmd.handle(addrport="[2001:0db8:1234:5678::9]:7000") self.assertServerSettings('2001:0db8:1234:5678::9', '7000', ipv6=True, raw_ipv6=True) @@ -1045,7 +1045,7 @@ class ManageRunserver(AdminScriptTestCase): # Potentially ambiguous - # Only 4 characters, all of which coudl be in an ipv6 address + # Only 4 characters, all of which could be in an ipv6 address self.cmd.handle(addrport="beef:7654") self.assertServerSettings('beef', '7654')