Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to automatically open url(not click open) http://127.0.0.1:8000 python manage.py runserver in pycharm terminal

I would like url (http://127.0.0.1:8000) to automatically open the browser (by no-click) if I enter the command 'python manage.py runserver'.

I tried to run http://127.0.0.1:8000/ with a browser without a mouse. so I tried all the shortcuts I could find, but I could not find them.

python manage.py runserver

(venv) seongyoonhuh@seongyoonhuh:/media/seongyoonhuh/usb16g/20190619/basic$ python manage.py runserver
Performing system checks...

System check identified no issues (0 silenced).
June 19, 2019 - 17:39:37
Django version 2.2.2, using settings 'config.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
like image 982
Seong Yoon Huh Avatar asked Sep 13 '25 23:09

Seong Yoon Huh


1 Answers

You can open up chrome before running the server and it should redirect once the server is up and running

open -a "Google Chrome" http://127.0.0.1:8000/ && python manage.py runserver

(command shown is for macOS so adjust accordingly for your os)

like image 113
Sayse Avatar answered Sep 16 '25 14:09

Sayse