zlorf / django-synchro

Django app for database data synchronization.
MIT License
66 stars 22 forks source link

REMOTE setting #1

Closed adriaant closed 12 years ago

adriaant commented 12 years ago

For testing purposes, I want to use my local machine as LOCAL and a separate test machine as REMOTE. You recommend to also add 'synchro' in the REMOTE INSTALLED_APPS, but what should I then use as REMOTE setting in DATABASES, because the test machine cannot connect to my localhost database?

zlorf commented 12 years ago

In such situation I set SYNCHRO_REMOTE = 'default' or set up additional sqlite DATABASE for the purpose.

I see, that's somehow stupid, because REMOTE setting is only needed when performing synchronization (logging on REMOTE machine works without accessing this setting), so it shouldn't be required.

I have a patch in mind.

adriaant commented 12 years ago

Yes, I was thinking of commenting out the lines:

if REMOTE not in settings.DATABASES:
    raise ImproperlyConfigured('SYNCHRO_REMOTE not specified or invalid.')
adriaant commented 12 years ago

Btw, really nice app!

zlorf commented 12 years ago

No, not hardcore commenting out! :) I would rather turn it into a ignorable warning and add setting-checking in command. Patch in progress. :)

zlorf commented 12 years ago

So, now you can legally write SYNCHRO_REMOTE = None. :)

adriaant commented 12 years ago

Thanks!