简体   繁体   中英

How to run Django server locally on master branch while I am developing on the other branch

I'm setting up a Django 2.1 server and I want to run the server because it's servicing to my LAN. I want the server to keep running while I'm developing it on the other branch.

But the server downs when I change the branch; Actually its branch changes too!

How to do that?

You shouldn't be developing and running production code from the same location. That's really bad practice. You can either:

  1. Set up a second copy of your repo in another location that production code runs from (it will only ever be set to the master branch).
  2. Develop your code on another system.

I always opt for number 2 above. I develop on my laptop (running everything locally), then deploy that to a Docker-ized Ubuntu system.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM