mango r228 - in branches/django: . mango



Author: ovitters
Date: Sun Jun 22 20:34:01 2008
New Revision: 228
URL: http://svn.gnome.org/viewvc/mango?rev=228&view=rev

Log:
	* mango/models.py (AccountGroups): Ensure Account uid only consists of
	lowercase letters.


Modified:
   branches/django/   (props changed)
   branches/django/ChangeLog
   branches/django/mango/models.py

Modified: branches/django/mango/models.py
==============================================================================
--- branches/django/mango/models.py	(original)
+++ branches/django/mango/models.py	Sun Jun 22 20:34:01 2008
@@ -9,6 +9,7 @@
 
 from django.db import models
 from django.conf import settings
+from django.core import validators
 from django.newforms import ModelForm
 import ldap
 
@@ -30,7 +31,8 @@
 class AccountGroups(models.Model):
     id = models.AutoField(primary_key=True)
     request = models.ForeignKey(AccountRequest)
-    cn = models.CharField(max_length=15)
+    cn = models.CharField(max_length=15,validator_list=[validators.isOnlyLetters,
+                                                        validators.isLowerCase])
     voucher_group = models.CharField(max_length=50, blank=True, null=True)
     verdict = models.CharField(max_length=1, default='P', editable=False)
     voucher = models.CharField(max_length=15, blank=True, null=True)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]