|
@ -249,33 +249,32 @@ class CrudDeleteMixin(FormMessagesMixin): |
|
|
class Crud(object): |
|
|
class Crud(object): |
|
|
|
|
|
|
|
|
def __init__(self, model, help_path, layout, |
|
|
def __init__(self, model, help_path, layout, |
|
|
crud_mixin=BaseCrudMixin, |
|
|
base_mixin=BaseCrudMixin, |
|
|
crud_list_mixin=CrudListMixin, |
|
|
list_mixin=CrudListMixin, |
|
|
crud_create_mixin=CrudCreateMixin, |
|
|
create_mixin=CrudCreateMixin, |
|
|
crud_detail_mixin=CrudDetailMixin, |
|
|
detail_mixin=CrudDetailMixin, |
|
|
crud_update_mixin=CrudUpdateMixin, |
|
|
update_mixin=CrudUpdateMixin, |
|
|
crud_delete_mixin=CrudDeleteMixin, |
|
|
delete_mixin=CrudDeleteMixin): |
|
|
): |
|
|
|
|
|
|
|
|
class CrudMixin(base_mixin): |
|
|
class CrudMixin(crud_mixin): |
|
|
|
|
|
pass |
|
|
pass |
|
|
CrudMixin.model = model |
|
|
CrudMixin.model = model |
|
|
CrudMixin.help_path = help_path |
|
|
CrudMixin.help_path = help_path |
|
|
CrudMixin.layout = layout |
|
|
CrudMixin.layout = layout |
|
|
|
|
|
|
|
|
class CrudListView(CrudMixin, crud_list_mixin, ListView): |
|
|
class CrudListView(CrudMixin, list_mixin, ListView): |
|
|
pass |
|
|
pass |
|
|
|
|
|
|
|
|
class CrudCreateView(CrudMixin, crud_create_mixin, CreateView): |
|
|
class CrudCreateView(CrudMixin, create_mixin, CreateView): |
|
|
pass |
|
|
pass |
|
|
|
|
|
|
|
|
class CrudDetailView(CrudMixin, crud_detail_mixin, DetailView): |
|
|
class CrudDetailView(CrudMixin, detail_mixin, DetailView): |
|
|
pass |
|
|
pass |
|
|
|
|
|
|
|
|
class CrudUpdateView(CrudMixin, crud_update_mixin, UpdateView): |
|
|
class CrudUpdateView(CrudMixin, update_mixin, UpdateView): |
|
|
pass |
|
|
pass |
|
|
|
|
|
|
|
|
class CrudDeleteView(CrudMixin, crud_delete_mixin, DeleteView): |
|
|
class CrudDeleteView(CrudMixin, delete_mixin, DeleteView): |
|
|
pass |
|
|
pass |
|
|
|
|
|
|
|
|
self.urlpatterns = [ |
|
|
self.urlpatterns = [ |
|
|