Creating a development environment for Django

We are starting a web project with Django (and this is pretty new to you), and I was wondering what would be the best way to set up a productive development environment.

Here is the info:

  • We are the developers working on the project.
  • We have a development / production server hosted on Webfactional (using apache server).
  • DB (MySQL) is hosted on this server
  • We both use Eclipse with Pydev
  • Project hosted on Github repository

So far, we have not configured the local development server, we synchronize the changes on the server through Github. But this is not very convenient ...

We thought about setting up local apache servers that use a remote database, and only synchronize from time to time.

Do you think it would be better?

Do you have any other ideas / additional tips?

Thanks!

+4
source share
2 answers

Do not try to share servers and databases during development. You are only embarrassed.

Each developer must have a local copy of MySQL on his own machine and run the development server, as mipadi recommends. Manage dB pattern changes across the South and store data in instruments or use South data migration. Each developer should submit their local version of the git repository, but only push the changes to Github when the specific task is completed and working (or, better, use the remote branch so that the changes are synchronized, but only merge back to the main one after completion).

It is a good idea to have a continuous integration server, such as Hudson / Jenkins, which runs tests after each commit to run and, if they pass, builds an updated version of the site that you can use to test features / users.

Edit to add . There is no connection between the development server and any particular database backend. As I recommend above, it is quite simple to install MySQL or PostgreSQL on a local machine and use the development server for this. I have been working this way for several years, after initially encountering some problems that you were worried about when switching between sqlite3 and producing MySQL db.

+8
source

Django has its own development server , which can be used for local testing.

+6
source

Source: https://habr.com/ru/post/1345953/


All Articles