From 5f818fdc39b07b26d87c915d5056bcfa48f77784 Mon Sep 17 00:00:00 2001 From: Francesco Siddi Date: Wed, 4 Nov 2015 16:22:47 +0100 Subject: [PATCH] Tweaks to user model Mainly checking for unique usernames. --- pillar/settings.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pillar/settings.py b/pillar/settings.py index f6362ee4..d8fc3509 100644 --- a/pillar/settings.py +++ b/pillar/settings.py @@ -15,18 +15,19 @@ PAGINATION_LIMIT = 25 users_schema = { 'full_name': { 'type': 'string', - 'minlength': 1, + 'minlength': 3, 'maxlength': 128, }, 'username': { 'type': 'string', - 'minlength': 1, - 'maxlength': 60, + 'minlength': 3, + 'maxlength': 128, 'required': True, + 'unique': True, }, 'email': { 'type': 'string', - 'minlength': 1, + 'minlength': 5, 'maxlength': 60, }, 'roles': {