:param model_class: the django model class
    :param operation: "Create" or "Update"
    :param ajax_mixin: user may pass a sub class of AjaxableResponseMixin to put more info in the ajax response
    :return: dynamically generated class based view. The instance of the view class has as_view method.

def create_ajaxable_view_from_model_inherit_parent_class(model_class, parent_class_list, operation="Create"):
    """
    :param model_class: the django model class
    :param operation: "Create" or "Update"
    :param ajax_mixin: user may pass a sub class of AjaxableResponseMixin to put more info in the ajax response
    :return: dynamically generated class based view. The instance of the view class has as_view method.
    """
    generic_module = importlib.import_module("django.views.generic")
    view_class_name = "%sView" % operation
    view_class = getattr(generic_module, view_class_name)
    # parent_class_tuple = (ajax_mixin, AjaxableFormContextUpdateMixin, view_class)
    parent_class_list.append(view_class)
    create_view_class = type("%s%s%s" % (model_class.__name__, operation, "View"),
                             tuple(parent_class_list), {
                                 # "Meta": type("Meta", (), {"model": self.model_class, "fields": []}),
                                 "model": model_class,
                                 "template_name": "form_view_base_template.html",
                                 "submit_button_text": operation,
                                 "success_url": "../"
                             })
    return create_view_class