25 lines
610 B
Plaintext
25 lines
610 B
Plaintext
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.
|