Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def validate_whitelist_blacklist(value, whitelist, blacklist):
    #print 'blacklist', blacklist
    if not accept_item(value, whitelist, blacklist):
        raise ValidationError(ugettext(u'Whitelist Blacklist validation error.'))
        


src/m/a/mayan-HEAD/apps/sources/forms.py   mayan(Download)
    WatchFolder)
from .widgets import FamFamRadioSelect
from .utils import validate_whitelist_blacklist
 
 
    def clean_file(self):
        data = self.cleaned_data['file']
        validate_whitelist_blacklist(data.name, self.source.whitelist.split(','), self.source.blacklist.split(','))
 
        return data