Changes between Initial Version and Version 1 of Ticket #27263, comment 10


Ignore:
Timestamp:
Sep 26, 2016, 7:01:26 AM (8 years ago)
Author:
Alexey Rogachev

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27263, comment 10

    initial v1  
    33As a workaround I can just do a set of calls in form's `clean_import_file` method like that:
    44
     5{{{#!python
    56def clean_import_file(self):
    67    import_file = self.cleaned_data.get('import_file')
     
    910        FileTypeValidator(extensions=('xlsx',))(import_file)
    1011    return import_file
     12}}}
    1113
    1214But I don't like this approach, even code is DRY, validators is not a part of configuration anymore.
Back to Top