3

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.

Lopez42
  • 81
  • 4
  • 1
    As an experienced programmer you should not avoid any programming language especially widely recognized one like Python. – Ski Sep 06 '11 at 17:51
  • @Skirmantas I imagine he means "when there's a solution in the language I know, I use it rather than learn a different language". – ceejayoz Sep 06 '11 at 17:52
  • 2
    One of the most common options I believe is deploying with Apache + mod_wsgi. As you can see also in Django docs. https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/ http://blog.stannard.net.au/2010/12/11/installing-django-with-apache-and-mod_wsgi-on-ubuntu-10-04/ – Botond Béres Sep 06 '11 at 17:56
  • 2
    I've no idea why you would say this is hard to find. If I wasn't familiar with Django but wanted to set up a production server, I would go to the Django documentation index, where there is a whole set of links about deployment. – Daniel Roseman Sep 06 '11 at 18:04

3 Answers3

3

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.

mdeous
  • 17,513
  • 7
  • 56
  • 60
1

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

ceejayoz
  • 176,543
  • 40
  • 303
  • 368
1

Satchmo seems like a django derivative. Setting up django on production is quite easy if your deployment environment is linux with apache then use mod_wsgi which is well documented here if its windows then you can use the pyisapie module and follow the documentation here

Hope that helps

Pannu
  • 2,547
  • 2
  • 23
  • 29