Python Forum
Postgresql and Django Configuration with Wamp - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Postgresql and Django Configuration with Wamp (/thread-2471.html)



Postgresql and Django Configuration with Wamp - Adelton - Mar-19-2017

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


RE: Postgresql and Django Configuration with Wamp - snippsat - Mar-19-2017

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.


RE: Postgresql and Django Configuration with Wamp - nilamo - Mar-19-2017

(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/intro/tutorial01/#the-development-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.)



RE: Postgresql and Django Configuration with Wamp - snippsat - Mar-19-2017

(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.


RE: Postgresql and Django Configuration with Wamp - Adelton - Mar-26-2017

Thank you both for your invaluable advice


RE: Postgresql and Django Configuration with Wamp - Larz60+ - Mar-26-2017

Once your problem is resloved,
PostgreSQL is an excellent RDBMS choice!