#14928 closed (fixed)
manage runserver does not allow host name as address
Reported by: | Karmel Allison | Owned by: | Łukasz Rekucki |
---|---|---|---|
Component: | django-admin.py runserver | Version: | 1.3-alpha |
Severity: | Keywords: | blocker | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In Django 1.2, it was possible to use a host name (i.e., example.com) to run a Django server from manage.py:
python manage.py runserver example.com:8000
However, that convenience has been removed in Django 1.3-alpha. It looks like in order to add functionality for IPv6 addresses, a regex was added (r14711, line 12) that raises an error if non-IP-like addresses are used:
python manage.py runserver example.com:8000 Error: 'example.com:8000' is not a valid port numberor address:port pair.
The ability to run the server using host names was quite convenient, and preferable in many cases to having an IP specified. Would it be possible to re-enable that feature?
Thanks!
Attachments (3)
Change History (13)
comment:1 by , 14 years ago
milestone: | → 1.3 |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 14 years ago
Owner: | changed from | to
---|
comment:3 by , 14 years ago
Triage Stage: | Accepted → Design decision needed |
---|
Not really a regression since it was not only undocumented but also clearly defined as a IP:port pair
comment:4 by , 14 years ago
Keywords: | blocker added |
---|
comment:5 by , 14 years ago
I've also a use case where I need to provide a FQDN to runserver (handling of various subdomains in an app). I do not see the real advantage of using the regex instead of the simpler (r)split that was previously used. The addr part of the 'addr:port' sequence is my business, not Django's.
comment:6 by , 14 years ago
Has patch: | set |
---|
comment:7 by , 14 years ago
I used a regex, because I needed a simple way to distinguish between IPv4 and IPv6. I think splitting on ":" is confusing as it's also an IPv6 address separator. I also wanted to give the user more meaningful error messages.
comment:8 by , 14 years ago
Triage Stage: | Design decision needed → Ready for checkin |
---|
Yah, lrekuck's patch seems to work nicely.
comment:9 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I can confirm the behavior. Accepting the ticket.
This should be fixed before releasing 1.3.