width/height

This commit is contained in:
j 2012-01-27 23:22:54 +01:00
commit 3417eb9281
2 changed files with 11 additions and 5 deletions

View file

@ -13,12 +13,13 @@ NEW_LENGTH = {
def monkey_patch_username():
for field in NEW_LENGTH:
f= User._meta.get_field(field)
f = User._meta.get_field(field)
f.max_length = NEW_LENGTH[field]
for v in f.validators:
if isinstance(v, MaxLengthValidator):
v.limit_value = NEW_LENGTH[field]
f= Group._meta.get_field('name')
f = Group._meta.get_field('name')
f.max_length = 255
for v in f.validators:
if isinstance(v, MaxLengthValidator):