On 10/8/06, zenx <[EMAIL PROTECTED]> wrote:
>
> 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?
Instructions on validator use can be found here:
http://www.djangoproject.com/documentation/forms/#validators
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
2 matches
Mail list logo