DjangoApp server can't be reached after modifying the codebase from local machine.
I'm very new here in Linode.
I just created a Django app from the marketplace. And I added some new code from my computer with the help of git and github. My extra code uses pipenv and some additional packages are installed as well.
Now after pulling the codebase, I'm not able to open up the site anymore.
I ran this command as well
Why is this happening? how am I supposed to continue development locally and use it on the server?
Hey @bsdiweb. It's tough to tell where the breakdown could be occurring if your server's preinstalled configurations were altered. All Marketplace Apps run on StackScripts that are preconfigured and can be limited in terms of customization. That being the case, it's entirely possible that one of the packages that were installed could be conflicting with something and causing the site to be unavailable.
I admittedly don't have a ton of experience with working with Django on the backend, but I tried to do some digging for you. I'm also going off the assumption that you deployed your Django server using the steps in this guide: How to Deploy Django with Marketplace Apps. If you went through those steps, you should be able to log into your Django page immediately and start configuring your sites.
I found some clarification about installing and using pipenv and creating isolated virtual environments (venv) in this article: Pipenv & Virtual Environments
There's some really nice clarification about the differences between virtual environment utilities in this forum as well: What is the difference between venv, pyvenv, pyenv, virtualenv, virtualenvwrapper, pipenv, etc?
Regarding your question about development: If you're looking to develop locally and then deploy after-the-fact, you may want to look into using a container deployment tool such as Docker. If you're not familiar with containers or Docker, I'd highly recommend checking out our intro guide as well as this video from NetworkChuck linked below:
We even have a Marketplace App for Docker: How to Deploy Docker with Marketplace Apps
If you decide to go down that road, you can ultimately deploy from your local environment to a Docker Image and then deploy your updated Image to a container running Django on your server. Here's a nice rundown from Semaphore: Dockerizing a Python Django Web Application
Of course this is just one recommendation, and it's not the only solution. Another option for testing development would be to set up two servers, keep one as your "live" environment and then reserve the other for testing. This other Community post talks about that approach: How to quickly setup a test environment