Python Forum
Nginx Setup Django Postgresql Eclipse
Thread Rating:
  • 3 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Nginx Setup Django Postgresql Eclipse
#1
Hi There,

I am new to python and I have been having difficulties setting up a development environment .I want to setup a Django Project in eclipse using postgresql and nginx as server.I have downloaded nginx and postgresql as well.I having issues configuring the config file for nginx for static and dynamic content .I want to use a virtual environment for the project.Your help with regards to how to efficient setup a development environment would be much appreciated.Do I use uswgi or fastcgi for python.I think it is not possible to install uswgi on windows.

Thank you 

Adelton
Reply
#2
When you say you're using a virtual environment, are you talking about virtualenv, or about a virtualized system using something like docker/virtualbox?

Because if it's the second, why would you need to install uswgi on windows?
Reply
#3
yes I am talking about virtualenv
Reply
#4
You don't mess with Nginx,Gunicorn,uWSGI on Windows.
You set up Django Project with PostgreSQL no problem this work fine in Windows.
So you work with Django build web-server all the way to the end,
if you happy with result and want to deploy now you installed eg Gunicorn,Nginx, on host server.
So now leave Window and the build in web server behind.

For Digital Ocean that use most,you start with a blank Linux Distro.
So as a demo how it look(install not all server setup):
ssh [email protected]

# Install Python and Ngnix
sudo apt-get update
sudo apt-get install python3-pip python3-dev nginx

# Make Virtual enviroment
mkdir whatip
cd whatip
sudo ufw allow 5000 #Open port
virtualenv ipenv
source ipenv/bin/activate
------------------
# Install Django Gunicorn PostgreSQL into Virtual enviroment
pip install gunicorn django psycopg2

/whatip/ipenv$ nano app_test.py
python app_test.py
# In browser:
http://xx.xx.250.200:5000/
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to Connect to PostgreSQL Through Jump Server and SSH Tunnel using Python? nishans 1 1,003 Jan-02-2024, 10:37 AM
Last Post: khanzain
Photo Integration of apache spark and Kafka on eclipse pyspark aupres 1 3,763 Feb-27-2021, 08:38 AM
Last Post: Serafim
  maintain a postgresql database using osm2pgsql apollo 1 2,319 Aug-03-2020, 10:33 PM
Last Post: Larz60+
  PostgreSQL psycopg2.errors.DuplicateColumn: column specified more than once rajnish_nationfirst 2 3,804 Jun-21-2020, 08:17 AM
Last Post: ibreeden
  StopIteration exception when mock PostgreSQL connection in several tests igor87z 1 2,930 Jun-10-2020, 06:16 PM
Last Post: ibreeden
  Python and Postgresql syntax select statement Nesreenmhd 1 4,994 Sep-07-2019, 06:08 PM
Last Post: ndc85430
  Create table with psycopg2 on postgreSQL DB yhecohen 2 3,332 Aug-23-2019, 05:56 AM
Last Post: massimo_m
  Error while fetching data from PostgreSQL linu 3 4,322 May-13-2019, 02:38 PM
Last Post: rxndy
  UML plugin for Python in Eclipse user2103 1 5,851 Mar-16-2018, 11:14 PM
Last Post: DeaD_EyE
  Return Row ID postgresql takaa 1 3,660 Nov-24-2017, 03:32 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020