Opened 18 years ago

Closed 18 years ago

Last modified 18 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: dev
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: no UI/UX: no

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

Download all attachments as: .zip

Change History (10)

by jvargas -a-t- acm -*- org, 18 years ago

Attachment: iputils.diff added

patch for management.py

by jvargas -a-t- acm -*- org, 18 years ago

Attachment: iputils.py added

django/utils/iputils.py module

comment:1 by jvargas -a-t- acm -*- org, 18 years ago

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

comment:2 by jvargas -a-t- acm -*- org, 18 years ago

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 by James Bennett, 18 years ago

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

comment:4 by jvargas -a-t- acm -*- org, 18 years ago

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 by James Bennett, 18 years ago

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 by jvargas -a-t- acm -*- org, 18 years ago

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

comment:7 by Adrian Holovaty, 18 years ago

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

milestone: Version 1.0

Milestone Version 1.0 deleted

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