From 1ce8417cedfafe7f882718daeb750de2184fd484 Mon Sep 17 00:00:00 2001 From: Oathbound Date: Wed, 24 Apr 2024 16:15:15 +0200 Subject: [PATCH] Added missing max length to email and debug off --- Healthcare/settings.py | 2 +- Management_User/models.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Healthcare/settings.py b/Healthcare/settings.py index c2335b6..7331394 100644 --- a/Healthcare/settings.py +++ b/Healthcare/settings.py @@ -22,7 +22,7 @@ SECRET_KEY = 'django-insecure-$mgowz!l-*26-w($a8gutmd)ww3-*k5l!xl#3*rx8=cf8n%6*0' # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = False ALLOWED_HOSTS = ["127.0.0.1", "localhost", "[::1]"] diff --git a/Management_User/models.py b/Management_User/models.py index 7fda7ff..7632182 100644 --- a/Management_User/models.py +++ b/Management_User/models.py @@ -60,6 +60,7 @@ class HealthCareUser(AbstractBaseUser, PermissionsMixin): email = models.EmailField( 'indirizzo e-mail', unique=True, + max_length=255, error_messages={'unique': 'Questa e-mail è già in uso'} ) luogo_nascita = models.CharField(