'Sets choices and initial value'

def __init__(self, user, *args, **kwargs):

    super(SettingsForm, self).__init__(*args, **kwargs)
    self.fields['default_task_status'].queryset = Object.filter_permitted(user, TaskStatus.objects, mode='x')
    try:
        conf = ModuleSetting.get_for_module('treeio.projects', 'default_task_status')[0]
        default_task_status = TaskStatus.objects.get(pk=long(conf.value))
        self.fields['default_task_status'].initial = default_task_status.id
    except Exception:
        pass
