From 254ad03382b19854cc8f36366d7bd12c289e68c7 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 28 Jan 2012 00:00:29 +0530 Subject: [PATCH] allow longer group names --- pandora/monkey_patch/models.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pandora/monkey_patch/models.py b/pandora/monkey_patch/models.py index bf86d81e..47416fd4 100644 --- a/pandora/monkey_patch/models.py +++ b/pandora/monkey_patch/models.py @@ -1,4 +1,4 @@ -from django.contrib.auth.models import User +from django.contrib.auth.models import User, Group from django.core.validators import MaxLengthValidator #load config from json @@ -18,5 +18,10 @@ def monkey_patch_username(): for v in f.validators: if isinstance(v, MaxLengthValidator): v.limit_value = NEW_LENGTH[field] + f= Group._meta.get_field('name') + f.max_length = 255 + for v in f.validators: + if isinstance(v, MaxLengthValidator): + v.limit_value = 255 monkey_patch_username()