2

I know that it's bad to use the Django web server in production. There's been at least one Stackoveflow question on this already.

But I'm wondering about where to draw the line between development and production? If I'm only allowing HTTP access to one (or a few) IP addresses, then I know I'm in development. What if I open it to all IP addresses, but only e-mail a couple friends to see what they think of what I've built?

As far as I can tell, the problems with using the Django server are:

  1. It's single-threaded
  2. Security

I don't think (1) is likely to be an issue if I'm only sharing it with a few people. For (2)--what's the worst-case scenario? Does it make a difference that I'm running on an Amazon EC2 server that I could very easily restart from a backup if something bad happened?

Community
  • 1
  • 1
DavidC
  • 1,409
  • 10
  • 25

2 Answers2

1

Well, the answer is very simple actually, you've left development when you have something you must protect: real user personal information, real data in your database that you'd be afraid to lose, etc.

Security isn't a concern until these things are present. The rule about not using the dev server in "production" is guidance, not mandatory. You can fire up the dev server in your production environment any time you want. However, you'd be silly to do so and then open up universal access to it, once your site is truly live and in use by the world.

Chris Pratt
  • 232,153
  • 36
  • 385
  • 444
  • I'm kind of hoping either your answer gets some upvotes, or someone who disagrees with you answers with some upvotes. – DavidC May 06 '11 at 00:24
0

Setting up mod_wsgi (or some other WSGI container) on a development machine takes all of 5 minutes, and can help you sort out deployment issues before you actually reach deployment. So really, why ever use the development server if you don't have to?

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
  • I can accept that if that's what I should do, then that's what I should do. But I've spent much longer than 5 minutes trying to find a good tutorial on setting up Python and setting up mod_wsgi. I know I'll have to spend some time on those things at some point, but right now what I'm excited about is making things work. If I can, I'd rather spend the energy I have now on what I''m excited about. – DavidC May 06 '11 at 00:22