Home:ALL Converter>Django local development, remote test and production configuration

Django local development, remote test and production configuration

Ask Time:2016-10-15T16:25:53         Author:Fabio

Json Formatter

I'm writing some django apps and I have this setup:

  1. local machine (laptop) that I use for development, with local dev virtualenv
  2. remote machine VPS (with public address) used for test. I need to have some end-users testing my app before moving to prod with test virtualenv
  3. remote machine VPS (with public address, same as above) used for production with production virtualenv

I use git for versioning.

The idea that I have so far (after reading various tutorials) to manage everything is:

  1. develop on local machine new branch
  2. push branch to git
  3. deploy branch into test virtualenv
  4. test it
  5. test passed, push branch to master and deploy into production virtualenv

And I have lot of questions about this:

  1. is this a recommended approach?
  2. how can I get the new branch to test virtualenv and not to production? Do I need to have two separate app folders, one for prod and one for test?
  3. How can I then move code from test to prod?

Thanks in advance, I'm a django/git novice so I'm trying to approach it in the best way from start.

Author:Fabio,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/40056803/django-local-development-remote-test-and-production-configuration
yy