From 3e6da6a10a27fe039027ae9c8f10994d3e674db0 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sun, 5 Nov 2017 17:00:02 +0100 Subject: [PATCH] enable strict mode for the database --- django/webshop/webshop/settings.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/django/webshop/webshop/settings.py b/django/webshop/webshop/settings.py index 8920fe6..ca96162 100644 --- a/django/webshop/webshop/settings.py +++ b/django/webshop/webshop/settings.py @@ -81,6 +81,9 @@ DATABASES = { 'PASSWORD': '2YKtY53F3HDDzPyExAaSh3jdVNh6VN', 'HOST': '127.0.0.1', 'PORT': '3306', + 'OPTIONS': { + 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'" + } } }