Django DB synchro
This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Benjamin Dauvergne f4cb942fa4 release 1.0 2013-12-11 17:38:08 +01:00
django_sync release 1.0 2013-12-11 17:38:08 +01:00
LICENSE release 1.0 2013-12-11 17:38:08 +01:00
README release 1.0 2013-12-11 17:38:08 +01:00
setup.py release 1.0 2013-12-11 17:38:08 +01:00

README

Install
-------

Add application to your INSTALLED_APPS::

   INSTALLED_APPS += ('django_sync',)

Add a remote DB to your DATABASES setting::

   DATABASES['remote'] = {
    'remote': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'remote',
    },

Usage
-----

./manage.py sync-with-remote [--from=remote] [--to=default] <app.model...>

Synchronize models in order from the remote db to the default db, or other db
if specified. You must order your models so that no model at the start refer to
model at the end of the list, through a foreign key field or a many to many
field.