Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #15112 -- Ensure that IPv6 addresses are correctly displayed in…

… the admin. Thanks to oxy for the report, and Łukasz Rekucki for the test case.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15343 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 9acd00a72e06c9b327089f12a6160aee4182f98b 1 parent a5cac77
@freakboy3742 freakboy3742 authored
View
1  django/core/management/commands/runserver.py
@@ -63,6 +63,7 @@ def handle(self, addrport='', *args, **options):
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):
View
6 tests/regressiontests/admin_scripts/tests.py
@@ -1025,10 +1025,10 @@ def test_runserver_addrport(self):
# 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 @@ def test_runserver_addrport(self):
# 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')
Please sign in to comment.
Something went wrong with that request. Please try again.