Code

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#2461 closed enhancement (wontfix)

[patch] manage.py: Add support for IP, IP:PORT, or PORT command-line arguments

Reported by: jvargas -a-t- acm -*- o r g Owned by: adrian
Component: Core (Management commands) Version: master
Severity: minor Keywords: ip address utils
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

These two files (iputils.py and iputils.diff) add support for IP, IP:PORT, or PORT command-line arguments to manage.py, so that

manage.py runserver [optional port number, or ipaddr:port]

becomes

manage.py runserver [optional ip address, optional port number, or ipaddr:port]

Attachments (2)

iputils.diff (2.0 KB) - added by jvargas -a-t- acm -*- org 8 years ago.
patch for management.py
iputils.py (2.5 KB) - added by jvargas -a-t- acm -*- org 8 years ago.
django/utils/iputils.py module

Download all attachments as: .zip

Change History (10)

Changed 8 years ago by jvargas -a-t- acm -*- org

patch for management.py

Changed 8 years ago by jvargas -a-t- acm -*- org

django/utils/iputils.py module

comment:1 Changed 8 years ago by jvargas -a-t- acm -*- org

Note: iputils.py contains doctests (commented out by default)

comment:2 Changed 8 years ago by jvargas -a-t- acm -*- org

  • Summary changed from manage.py: Add support for IP, IP:PORT, or PORT command-line arguments to [patch] manage.py: Add support for IP, IP:PORT, or PORT command-line arguments

Added [patch] prefix to ticket summary.

comment:3 Changed 8 years ago by ubernostrum

How is this different from what runserver already does wrt to specifying port or IP/port? Have I missed something here?

comment:4 Changed 8 years ago by jvargas -a-t- acm -*- org

Currently (SVN), you cannot do

$ python manage.py runserver 192.168.1.2

Error: '192.168.1.2' is not a valid port number.

comment:5 Changed 8 years ago by ubernostrum

Hm. So, really what this should be is just adding support for specifying only an IP and having it bind to the default port on that IP, so that runserver 192.168.1.2 would become functionally equivalent to runserver 192.168.1.2:8000 ?

comment:6 Changed 8 years ago by jvargas -a-t- acm -*- org

Indeed, but it also adds some checks for validity (see iputils.py file) and unit tests.

comment:7 Changed 8 years ago by adrian

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

This doesn't introduce any new functionality, so I'm marking it as a wontfix. It's really not a big deal to have to specify the port if you want to use a custom IP address.

As an aside, I'm always hesitant to add more stuff to django.utils, so that fact played into this decision.

comment:8 Changed 7 years ago by anonymous

  • milestone Version 1.0 deleted

Milestone Version 1.0 deleted

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.