diff --git a/tiramisu_json_api/api.py b/tiramisu_json_api/api.py index eb58e7b..8026194 100644 --- a/tiramisu_json_api/api.py +++ b/tiramisu_json_api/api.py @@ -9,6 +9,8 @@ from .setting import undefined from .i18n import _ +TIRAMISU_JSON_VERSION = '1.0' + TYPE = {'boolean': bool, 'integer': int, @@ -488,6 +490,8 @@ class Config: # config def __init__(self, json): + if json.get('version') != TIRAMISU_JSON_VERSION: + raise Exception('incompatible tiramisu-json format version (got {}, expected {})'.format(json.get('version', '0.0'), TIRAMISU_JSON_VERSION)) self.model = json['model'] self.form = json['form'] self.form = {}