Recently I developed a simple django project to be used by my colleagues. The goal was to have the project only available within the network so no one outside the company could access it. The company has a server, with a certain IP that will host the project.
What steps do I have to take, either in django or on the company server, to make the project available to everyone in the company? Do I have to install python in the server? I tried to put the servers IPs in allowed_hosts but it doesn’t work.
You’ll have a number of decisions to make, and few of them are going to have obvious answers if you’ve never deployed a web application before. Be prepared to take the time needed to understand what needs to be done.
It has been said here and elsewhere that doing a production-quality deployment is one of the most difficult things you will ever do with Django.
There are no one set of “best practices”, just some general principles that would apply regardless of the framework or type of application.
All decisions regarding a specific approach need to be evaluated in the context of “risk”. You need to answer:
What’s the worst that can go wrong at any given point?
What is it going to take to recover from the worse-case scenario?
What is the effect on the business of an outage lasting for the “Time To Recover”?
I’ve got a handful of projects running the full range from “connect VSCode to the production server and make changes directly” to “every change requires multiple approvals at every step before deployment”. So it all depends on your business requirements - which may be affected both by business needs and policy.
Proceed to the Cygwin Setup - Select Packages window.
Select Full in View.
Enter gcc in Search.
Find gcc-core row in Package column and change Skip to the required version.
Enter g++ in Search.
Find gcc-g++ row in Package column and change Skip to the required version.
Proceed to the next step and install the packages.
Then download uwsgi. Note: uwsgi is written for Linux, it does not run on Windows, hence you need to download Cygwin for Windows. It acts as a traslator for uwsgi on windows platform.
Step 1:Download the stable release and extract the tar file
Step 2:Open uwsgiconfig.py and import platform then replace os.uname()[index] with platform.uname()[index] because Windows does not understand os.uname()[index], it is Linux code.