Hi, I want to make a filefield that only allows to upload mp3 files. I
have added the following code to my model:
def _manipulator_validate_filefield(self,field_data,all_data):
if not self.archivo.endswith(".mp3"):
raise validators.ValidationError, 'Please select an mp3
file.'
I thought that was enought to validate the file but it doesn't validate
anything when saving a new object, so what else should I do?
thank you!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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/django-users
-~----------~----~----~----~------~----~------~--~---