django
django copied to clipboard
Fixed #32813 -- Display development server address after server bind
Changelog
So far Django displays the server name and port before actual binding;
If a user selects port 0, [wildcard port]:
$ ./manage.py runserver 127.0.0.1:0
...
Starting development server at http://127.0.0.1:0/
Quit the server with CONTROL-C.
Now if the user opens a browser with this address they will not find the app running here. Because for the wildcard port, the actual physical port is selected by the operating system.
After this change Django will be able to pick up the correct port:
$ ./manage.py runserver 127.0.0.1:0
...
Starting development server at http://127.0.0.1:25837/
Quit the server with CONTROL-C.
Ref - https://code.djangoproject.com/ticket/32813
Backstory
I was looking for tickets for my first contribution to Django and I landed on this task, the original PR https://github.com/django/django/pull/14250 was closed so I picked it up from there.
Hello @TheAbhijeet! Thank you for your contribution 💪
As it's your first contribution be sure to check out the patch review checklist.
If you're fixing a ticket from Trac make sure to set the "Has patch" flag and include a link to this PR in the ticket!
If you have any design or process questions then you can ask in the Django forum.
Welcome aboard ⛵️!
I've checked Patch needs improvement on the ticket-32813. Please uncheck that when you've updated 👍
Hi @carltongibson @felixxm
I don't understand why MySQL builds are failing. Can you please help me solve this?
Hi @carltongibson @felixxm
I don't understand why MySQL builds are failing. Can you please help me solve this?
Apparently re-running the test cases worked.
Updated the branch, please let me know what you think.
Updated in #16319.