Python Forum
Postgresql and Django Configuration with Wamp
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Postgresql and Django Configuration with Wamp
#1
Hi there,

I am new to Python and I  am trying to configure Wamp with Postgresql and Django.I have already downloaded both application but I do not know how to configure both with Wamp. I have watched countless videos pertaining to this and with regards to Django I need to install a file mod_wsgi.so.I have already downloaded  the file  mod_wsgi‑4.5.15+ap24vc14‑cp36‑cp36m‑win32.whl but I cannot find this file with the extension .so.With regards to postgresql I need to apparently uncomment these two entries  ;extension=php_pdo_pgsql.dll  ;extension=php_pgsql.dll  in the file php.ini.I just wanted to check if it is firstly possible to run a django project in wamp using postgresql  and if these two approaches are correct and will permit me to run a web application using wamp. I just need to add that I can already run a python script in wamp using cgi.I would really appreciate your help in resolving this matter which has been taking an eternity to resolve.

Adelton
Reply
#2
Do not mess with Wamp and CGI at all,that make no sense for Python.
The normal way is using build in web-server for Django,Flask..ect.
With the build in web-server you build all you want regarding a web-app/site.

If want to deploy(share with world) then think of using a good web-server.
If i deploy i use Gunicorn with NGINX,this has a lot of power and are fairly simple to setup.
An other combo that is used for Python is uWSGI with NGINX.
Good hosts for Python Digital Ocean, Heroku ,PythonAnywhere, AWS Lambda.
Reply
#3
(Mar-19-2017, 05:35 PM)snippsat Wrote: Do not mess with Wamp and CGI at all,that make no sense for Python.
The normal way is using build in web-server for Django,Flask..ect.

I don't... think that's true.  The built-in server is specifically only for development, for real-world usage isn't wsgi still the preferred method?

https://docs.djangoproject.com/en/1.10/i...ent-server Wrote:Now’s a good time to note: don’t use this server in anything resembling a production environment. It’s intended only for use while developing. (We’re in the business of making Web frameworks, not Web servers.)
Reply
#4
(Mar-19-2017, 06:42 PM)nilamo Wrote: I don't... think that's true.  The built-in server is specifically only for development, for real-world usage isn't wsgi still the preferred method?
I think you misunderstand,it's of course WSGI all the way.
The build web-servers(Django,Flask..) is only for development local.
What i mean you can build test all local,when happy with result and want to deploy.
Then do not use the build in web-server anymore.

As i mention Gunicorn.
Quote:Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX. It's a pre-fork worker model.
Gunicorn is a stand-alone WSGI web application server which offers a lot of functionality.
It's a production ready WSGI web-server.
Then is normal to Nginx in front,
as (reverse-proxy) server that handle the task of serving these files and managing connections (requests).
Nginx relieves a lot of the load from the application servers, granting you a much better overall performance.
Reply
#5
Thank you both for your invaluable advice
Reply
#6
Once your problem is resloved,
PostgreSQL is an excellent RDBMS choice!
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 843 Jan-02-2024, 10:37 AM
Last Post: khanzain
  Python modules for accessing the configuration of relevant paths Imago 1 1,324 May-07-2022, 07:28 PM
Last Post: Larz60+
  maintain a postgresql database using osm2pgsql apollo 1 2,254 Aug-03-2020, 10:33 PM
Last Post: Larz60+
  INI Configuration GUI goofygoo 4 4,447 Jul-19-2020, 08:47 PM
Last Post: goofygoo
  PostgreSQL psycopg2.errors.DuplicateColumn: column specified more than once rajnish_nationfirst 2 3,691 Jun-21-2020, 08:17 AM
Last Post: ibreeden
  StopIteration exception when mock PostgreSQL connection in several tests igor87z 1 2,878 Jun-10-2020, 06:16 PM
Last Post: ibreeden
  Read Yaml configuration file in Python binhduonggttn 1 2,039 Feb-11-2020, 05:43 AM
Last Post: ndc85430
  Python and Postgresql syntax select statement Nesreenmhd 1 4,937 Sep-07-2019, 06:08 PM
Last Post: ndc85430
  Create table with psycopg2 on postgreSQL DB yhecohen 2 3,272 Aug-23-2019, 05:56 AM
Last Post: massimo_m
  Error while fetching data from PostgreSQL linu 3 4,233 May-13-2019, 02:38 PM
Last Post: rxndy

Forum Jump:

User Panel Messages

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