Member-only story
Data Entry
Automatic Update of Django Models from a Google Spreadsheet
A ready-to-run tutorial in Python on how to create and update Django models directly from a Google Spreadsheet
Often Data Model definition and Data Model Implementation are performed by different people and a little change in Data Model definition should be transformed into an implemented model as soon as possible.
The speed with which changes in the model can be translated into implementation depends on how definition and implementation are related to each other.
In this tutorial I propose a mechanism to directly translate changes in the model into changes in the implementation. I exploit the following tools:
- Google Spreadsheet for the Data Model definition
- Python to translate changes in the spreadsheet into changes for Django
- Django to render the model in a Web interface.
Three steps are needed to automatically update a Data Model in Django through a Google Spreadsheet:
- Data Model Definition in Google Spreadsheet
- Model Translation from a Google Spreadsheet to a Django Model
- Model Update in Django