[Django] #34068: `runserver 0` is not shortcut for 0.0.0.0

32 views
Skip to first unread message

Django

unread,
Oct 1, 2022, 6:49:25 PM10/1/22
to django-...@googlegroups.com
#34068: `runserver 0` is not shortcut for 0.0.0.0
-------------------------------------+-------------------------------------
Reporter: Ruslan | Owner: nobody
Oleksandrovich Kovtun |
Type: Bug | Status: new
Component: | Version: 4.1
Uncategorized |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 1 |
-------------------------------------+-------------------------------------
According to [https://docs.djangoproject.com/en/4.1/intro/tutorial01/#the-
development-server 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.

--
Ticket URL: <https://code.djangoproject.com/ticket/34068>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 2, 2022, 5:38:20 AM10/2/22
to django-...@googlegroups.com
#34068: `runserver 0` is not shortcut for 0.0.0.0
-------------------------------------+-------------------------------------
Reporter: Ruslan | Owner: nobody
Oleksandrovich Kovtun |
Type: Bug | Status: new
Component: Uncategorized | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by 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?

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 🤷‍♂️

--
Ticket URL: <https://code.djangoproject.com/ticket/34068#comment:1>

Django

unread,
Oct 2, 2022, 6:14:37 AM10/2/22
to django-...@googlegroups.com
#34068: `runserver 0` is not shortcut for 0.0.0.0
-------------------------------------+-------------------------------------
Reporter: Ruslan | Owner: nobody
Oleksandrovich Kovtun |
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* type: Bug => Cleanup/optimization
* component: Uncategorized => Documentation
* stage: Unreviewed => Accepted


Comment:

According to the Diátaxis framework, [https://diataxis.fr/tutorials
/#offer-only-minimum-necessary-explanation 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.)

--
Ticket URL: <https://code.djangoproject.com/ticket/34068#comment:2>

Django

unread,
Oct 2, 2022, 1:23:20 PM10/2/22
to django-...@googlegroups.com
#34068: `runserver 0` is not shortcut for 0.0.0.0
-------------------------------------+-------------------------------------
Reporter: Ruslan | Owner: nobody
Oleksandrovich Kovtun |
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Ruslan Oleksandrovich Kovtun):

Replying to [comment:1 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

}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34068#comment:3>

Django

unread,
Oct 2, 2022, 1:32:59 PM10/2/22
to django-...@googlegroups.com
#34068: `runserver 0` is not shortcut for 0.0.0.0
-------------------------------------+-------------------------------------
Reporter: Ruslan | Owner: nobody
Oleksandrovich Kovtun |
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Ruslan Oleksandrovich Kovtun):

Replying to [comment:2 Carlton Gibson]:


> According to the Diátaxis framework, [https://diataxis.fr/tutorials
/#offer-only-minimum-necessary-explanation 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.)

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/34068#comment:4>

Reply all
Reply to author
Forward
0 new messages