def full_clean(self):
        cache_type = self['cache_type'].data or self['cache_type'].initial

        for iter_cache_type, field in six.iteritems(
                self.CACHE_LOCATION_FIELD_MAP):
            self.fields[field].required = (cache_type == iter_cache_type)

        return super(GeneralSettingsForm, self).full_clean()
Determines where to look for template based on user options
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/admin/forms.py/GeneralSettingsForm.full_clean--crossover with--dataset/ETHPy150Open nathangrigg/dayone_export/dayone_export/__init__.py/_determine_inheritance