Code

Opened 8 years ago

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

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@… 8 years ago.

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by mail@…

comment:1 Changed 8 years ago by adrian

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

comment:2 Changed 8 years ago by Fraser Nevett <mail@…>

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 Changed 8 years ago by adrian

  • Resolution set to wontfix
  • Status changed from new to closed

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

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.