From 7c49223afe50d0d42624b869e968fcd357cb2a39 Mon Sep 17 00:00:00 2001 From: Chance Zibolski Date: Fri, 26 Jul 2013 13:40:10 -0700 Subject: [PATCH] Update LowerCaseCharField to subclass proper CharField Previously it was improperly subclassing the form version of the charfield. refs #14103 --- ganeti_web/fields.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ganeti_web/fields.py b/ganeti_web/fields.py index 87eaf6d8..de1b5e5d 100644 --- a/ganeti_web/fields.py +++ b/ganeti_web/fields.py @@ -52,7 +52,11 @@ class ModifyingFieldDescriptor(object): instance.__dict__[self.field.name] = self.field.to_python(value) -class LowerCaseCharField(CharField): +class LowerCaseCharField(models.CharField): + """ + This is a wrapper around the charfield which forces values to lowercase + when assigned and prior to saving to the DB + """ def to_python(self, value): value = super(LowerCaseCharField, self).to_python(value) if isinstance(value, basestring): -- 2.11.4.GIT