Code

Opened 3 years ago

Closed 3 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: UI/UX:

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...?).

Attachments (0)

Change History (1)

comment:1 Changed 3 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #14928.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.