Opened 10 years ago

Closed 10 years ago

Last modified 10 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 Holovaty
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 10 years ago.
patch for management.py
iputils.py (2.5 KB) - added by jvargas -a-t- acm -*- org 10 years ago.
django/utils/iputils.py module

Download all attachments as: .zip

Change History (10)

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

Attachment: iputils.diff added

patch for management.py

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

Attachment: iputils.py added

django/utils/iputils.py module

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

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

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

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

Added [patch] prefix to ticket summary.

comment:3 Changed 10 years ago by James Bennett

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

comment:4 Changed 10 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 10 years ago by James Bennett

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 10 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 10 years ago by Adrian Holovaty

Resolution: wontfix
Status: newclosed

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 10 years ago by (none)

milestone: Version 1.0

Milestone Version 1.0 deleted

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