Hi
I have problem validating uploaded file using Django 1.0.2.
I have :
class Create_profile(djangoforms.ModelForm):
clubs = db.GqlQuery("Select * from Club")
C = [(x.key(), x.name) for x in clubs]
club = forms.ChoiceField(choices=C)
class Meta:
model=Profile
because blobs needs to be less then 1Mb and Profile contains avatar :
pic = db.BlobProperty()
i tried to make custom validation checking if blob is not too big,
just for test I create naive implementation:
def clean_pic(self):
raise forms.ValidationError(u'That image is too big')
if I do not upload a file it works fine - I get an validationError
that image is too big but If I uppload any file I get :
AttributeError at /xyz/
'NoneType' object has no attribute 'validate'
Exception Value: 'NoneType' object has no attribute 'validate'
Exception Location: /home/wonglik/Applications/appengine/ga1.1.7/
google_appengine/google/appengine/ext/db/djangoforms.py in
property_clean, line 612
I become suspicious this can be because of Django1.0 changes. I did
not debug goole's code but naming convention make me thing they use
clean_data instead of cleanded_data .As far as I am concerned
clean_data switch its name to cleaned_data.
Is this a bug or does any body have an Idea what I am doing wrong?
regards
Mateusz
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---