Opened 3 years ago
Closed 3 years ago
#34068 closed Bug (fixed)
`runserver 0`'s "Starting development server at <address>" doesn't work
| Reported by: | Ruslan Oleksandrovich Kovtun | Owned by: | Dhanush |
|---|---|---|---|
| Component: | Core (Management commands) | Version: | 4.1 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | yes |
Description
According to tutorial running
python manage.py runserver 0:8000
is the same as
python manage.py runserver 0.0.0.0:8000
but it's output
$ python manage.py runserver 0:8000 Watching for file changes with StatReloader ... Starting development server at http://0:8000/ ...
So that you can't use link "http://0:8000/" in your browser. Output should be "Starting development server at http://0.0.0.0:8000/" when providing "0:8000" in command line in order to stay consistent with docs.
Change History (11)
follow-up: 3 comment:1 by , 3 years ago
follow-up: 4 comment:2 by , 3 years ago
| Component: | Uncategorized → Documentation |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
| Type: | Bug → Cleanup/optimization |
According to the Diátaxis framework, a tutorial should provide only the minimum necessary explanation.
Even if we think the Changing the port box is relevant here (which we might not 🤔) I think the whole 0 is a shortcut bit could just be cut without loss. (That's just my take.)
comment:3 by , 3 years ago
Replying to David Sanders:
On a Mac I could click that link and have it take me to http://0.0.0.0:8000/
What OS are you on?
$ neofetch
-/oyddmdhs+:. ruslan@gentoo-pc
-odNMMMMMMMMNNmhy+-` ----------------
-yNMMMMMMMMMMMNNNmmdhy+- OS: Gentoo Base System release 2.8 x86_64
`omMMMMMMMMMMMMNmdmmmmddhhy/` Host: GA-MA785GM-US2H
omMMMMMMMMMMMNhhyyyohmdddhhhdo` Kernel: 5.15.41-x86_64-gt-730-sl
.ydMMMMMMMMMMdhs++so/smdddhhhhdm+` Uptime: 4 days, 9 hours, 2 mins
oyhdmNMMMMMMMNdyooydmddddhhhhyhNd. Packages: 1401 (emerge), 17 (flatpak)
:oyhhdNNMMMMMMMNNNmmdddhhhhhyymMh Shell: bash 5.1.16
.:+sydNMMMMMNNNmmmdddhhhhhhmMmy Resolution: 1280x1024
/mMMMMMMNNNmmmdddhhhhhmMNhs: DE: GNOME 42.3.1
`oNMMMMMMMNNNmmmddddhhdmMNhs+` WM: Mutter
`sNMMMMMMMMNNNmmmdddddmNMmhs/. WM Theme: Adwaita
/NMMMMMMMMNNNNmmmdddmNMNdso:` Theme: Adwaita-dark [GTK2/3]
+MMMMMMMNNNNNmmmmdmNMNdso/- Icons: Adwaita [GTK2/3]
yMMNNNNNNNmmmmmNNMmhs+/-` Terminal: tmux
/hMMNNNNNNNNMNdhs++/-` CPU: AMD Athlon II X2 240 (2) @ 2.800GHz
`/ohdmmddhys+++/:.` GPU: NVIDIA GeForce GT 730
`-//////:--. Memory: 2350MiB / 9959MiB
$ google-chrome-stable --version
Google Chrome 105.0.5195.52
comment:4 by , 3 years ago
Replying to Carlton Gibson:
According to the Diátaxis framework, a tutorial should provide only the minimum necessary explanation.
Even if we think the Changing the port box is relevant here (which we might not 🤔) I think the whole
0 is a shortcutbit could just be cut without loss. (That's just my take.)
There will be loss, because 0.0.0.0 is actually binded on 0 (opening 0.0.0.0 in browser gives dev server page) but browser can't recognize such shortcut, that is why it is TUI bug.
TUI should show "http://0.0.0.0:8000/" when provided with "0:8000".
If you don't care just close the issue, I have reported an issue as clear as possible, good bye.
comment:5 by , 3 years ago
| Component: | Documentation → Core (Management commands) |
|---|---|
| Easy pickings: | set |
| Summary: | `runserver 0` is not shortcut for 0.0.0.0 → `runserver 0`'s "Starting development server at <address>" doesn't work |
| Type: | Cleanup/optimization → Bug |
Pasting http://0:8000/ into Firefox works but not in Chrome. I think it would be reasonable to rewrite an address of 0 (zero) to 0.0.0.0 in runserver's output.
comment:6 by , 3 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:8 by , 3 years ago
| Patch needs improvement: | set |
|---|
comment:9 by , 3 years ago
| Needs tests: | set |
|---|
comment:10 by , 3 years ago
| Needs tests: | unset |
|---|---|
| Patch needs improvement: | unset |
| Triage Stage: | Accepted → Ready for checkin |
On a Mac I could click that link and have it take me to http://0.0.0.0:8000/
What OS are you on?
It might even be better to just explicitly change it to say "0.0.0.0" because at least then you can copy & paste it as well … Let's wait to see what the triage team decide 🤷♂️