Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Russell Keith-Magee authored January 27, 2011
1  django/core/management/commands/runserver.py
@@ -63,6 +63,7 @@ def handle(self, addrport='', *args, **options):
63 63
                     raise CommandError('"%s" is not a valid IPv6 address.' % self.addr)
64 64
         if not self.addr:
65 65
             self.addr = self.use_ipv6 and '::1' or '127.0.0.1'
  66
+            self._raw_ipv6 = bool(self.use_ipv6)
66 67
         self.run(*args, **options)
67 68
 
68 69
     def run(self, *args, **options):
6  tests/regressiontests/admin_scripts/tests.py
@@ -1025,10 +1025,10 @@ def test_runserver_addrport(self):
1025 1025
 
1026 1026
         # IPv6
1027 1027
         self.cmd.handle(addrport="", use_ipv6=True)
1028  
-        self.assertServerSettings('::1', '8000', ipv6=True)
  1028
+        self.assertServerSettings('::1', '8000', ipv6=True, raw_ipv6=True)
1029 1029
 
1030 1030
         self.cmd.handle(addrport="7000", use_ipv6=True)
1031  
-        self.assertServerSettings('::1', '7000', ipv6=True)
  1031
+        self.assertServerSettings('::1', '7000', ipv6=True, raw_ipv6=True)
1032 1032
 
1033 1033
         self.cmd.handle(addrport="[2001:0db8:1234:5678::9]:7000")
1034 1034
         self.assertServerSettings('2001:0db8:1234:5678::9', '7000', ipv6=True, raw_ipv6=True)
@@ -1045,7 +1045,7 @@ def test_runserver_addrport(self):
1045 1045
 
1046 1046
         # Potentially ambiguous
1047 1047
 
1048  
-        # Only 4 characters, all of which coudl be in an ipv6 address
  1048
+        # Only 4 characters, all of which could be in an ipv6 address
1049 1049
         self.cmd.handle(addrport="beef:7654")
1050 1050
         self.assertServerSettings('beef', '7654')
1051 1051
 

0 notes on commit 9acd00a

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