Opened 13 years ago

Closed 13 years ago

#15219 closed (duplicate)

'runserver' no longer accepts hostname for address:port pair arguments

Reported by: andrewl Owned by: nobody
Component: django-admin.py runserver Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

runserver used to accept a hostname as the 'address' argument for the address:port pair. For example:

  python manage.py runserver myhostname:8765

However this now fails with the following error message:

  Error: 'myhostname:8765' is not a valid port numberor address:port pair.

...which, incidentally, is missing a space between 'number' and 'or' (see lines 46-47 in django.core.management.commands.runserver.py).

Obviously dummy host:port values are used in the example above, but (just to clarify) the error message also occurs when real, valid host:port values are used.

The error is because of the naiveip_re regular expression defined on line 12 of django.core.management.commands.runserver.py, which is used to validate the 'address' portion of the arguments, which will only accept IPv4/v6 addresses, not hostnames (which, admittedly, may be the desired behaviour...?).

Change History (1)

comment:1 by Russell Keith-Magee, 13 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #14928.

Note: See TracTickets for help on using tickets.
Back to Top