Opened 19 years ago

Closed 19 years ago

#2105 closed enhancement (wontfix)

[patch] Allow manage.py runserver to use service names as well as port numbers

Reported by: mail@… Owned by: Adrian Holovaty
Component: Core (Management commands) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This patch allows a named service to be passed to manage.py runserver instead of a port number.

e.g. if /etc/services contains the line

dummy     12345/tcp

then you can run:

manage.py runserver dummy

to start the server on port 12345.

Attachments (1)

service-names.diff (792 bytes ) - added by mail@… 19 years ago.

Download all attachments as: .zip

Change History (4)

by mail@…, 19 years ago

Attachment: service-names.diff added

comment:1 by Adrian Holovaty, 19 years ago

Do people typically know port service names, or is this too much of a special case?

comment:2 by Fraser Nevett <mail@…>, 19 years ago

I agree this is probably a special case.

This came about because we have a shared development server, and thought it would be sensible to assign each developer with a port so they can each run their own instance of Django. In /etc/services we have a port for each developer's name; for example:

tom    9000/tcp
dick   9001/tcp
harry  9002/tcp

I'm not overly concerned if this gets included, but I believe the interchangeability of port numbers and service names is a pretty standard Linux/Unix feature so we might want to provide support for it. What do people think?

P.S. We've only tested that this works on Linux; not sure if/how Windows and other OSs support socket.getservbyname.

comment:3 by Adrian Holovaty, 19 years ago

Resolution: wontfix
Status: newclosed

With that in mind, this seems like too much of a special case (and feature creep) for inclusion in Django.

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