'Initialize the design from a valid form data.'

def __init__(self, form=None, query_type=None):

    if (form is not None):
        assert isinstance(form, MultiForm)
        self._data_dict = {'query': normalize_form_dict(form.query, HQLdesign._QUERY_ATTRS), 'settings': normalize_formset_dict(form.settings, HQLdesign._SETTINGS_ATTRS), 'file_resources': normalize_formset_dict(form.file_resources, HQLdesign._FILE_RES_ATTRS), 'functions': normalize_formset_dict(form.functions, HQLdesign._FUNCTIONS_ATTRS)}
        if (query_type is not None):
            self._data_dict['query']['type'] = query_type
