Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I initialise my Satchmo website?

As an experienced PHP programmer I tend to avoid things like Python. However we all must play with the cards we have been dealt with and I now have to work with a Satchmo website.

I have very little python, django and satchmo so I need some help. I'm ok with setting up a development server but I cannot get my website to work on a production server.

I've seen the use of "python manage.py runserver", this solution is even on Stack Overflow. However, when I see this solution there is usually someone saying "I hope you're not using that on production" so I assume this is a very incorrect way to do it. To my frustration the people that seem to know that this command line is insecure, also have no desire to share with the rest of us, just how excatly does one initiate their Satchmo Production server?

Many thanks.

like image 557
Lopez42 Avatar asked Dec 06 '25 01:12

Lopez42


2 Answers

To deploy a Django website on a production server, you have to serve it either with Apache+mod_wsgi, nginx+gunicorn, nginx+uwsgi, or any other server supporting WSGI. The Django documentation has a page on deploying Django on Apache with mod_wsgi, for the other solutions, there are plenty of useful documentation around the web.

like image 200
mdeous Avatar answered Dec 07 '25 13:12

mdeous


runserver is just for development/testing. It won't handle high load, security, etc.

Python.org has docs on how to set up a proper webserver to serve Python code: http://docs.python.org/howto/webservers.html

like image 39
ceejayoz Avatar answered Dec 07 '25 13:12

ceejayoz