Mercurial > public > sg101
comparison gpp/bio/forms.py @ 338:e28aee19f7c9
Fix typo that referred to non-existant setting MAX_AVATAR_SIZE.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 26 Feb 2011 18:50:59 +0000 |
parents | 88b2b9cb8c1f |
children | e0523e17ea43 |
comparison
equal
deleted
inserted
replaced
337:b4f0980506e0 | 338:e28aee19f7c9 |
---|---|
60 def clean_avatar_file(self): | 60 def clean_avatar_file(self): |
61 f = self.cleaned_data['avatar_file'] | 61 f = self.cleaned_data['avatar_file'] |
62 if f is not None: | 62 if f is not None: |
63 if f.size > settings.MAX_AVATAR_SIZE_BYTES: | 63 if f.size > settings.MAX_AVATAR_SIZE_BYTES: |
64 raise forms.ValidationError("Please upload a file smaller than " | 64 raise forms.ValidationError("Please upload a file smaller than " |
65 "%s bytes." % settings.MAX_AVATAR_SIZE) | 65 "%s bytes." % settings.MAX_AVATAR_SIZE_BYTES) |
66 try: | 66 try: |
67 self.image = parse_image(f) | 67 self.image = parse_image(f) |
68 except IOError: | 68 except IOError: |
69 raise forms.ValidationError("Please upload a valid image. " | 69 raise forms.ValidationError("Please upload a valid image. " |
70 "The file you uploaded was either not an image or a " | 70 "The file you uploaded was either not an image or a " |