1👍
✅
First of all, you will need some api (like django-rest-framework to provide some way to comunicate from your local – offline website to global – online website. Using normal django views wouldn’t be efficient for that.
Next – you need some way to check if connection can be estabilished – and run that check for example in 5 minute intervals (using cron propably, or some external process because django won’t handle that by itself). You can also trigger that check by hand.
Next – when connection can be estabilished, you need to connect to API and push all changes from your local database to global website. After each change, you should mark it in local database that it is already synchronized or just remove it from queue.
Source:stackexchange.com