Main page¶
He takes all the resources of the settings to return them to the template
home.jinja2
. It implemented in pyramid_sacrud.views.sa_home()
.
Old Architecture is good, but it does not allow use tree structure of
resources and has hard depency from SQLAlchemy
, sacrud
,
sacrud_deform
etc... This is not flexible solution. A new generation of
pyramid_sacrud
>= 0.3.0 represent just interface for any backends, like:
pyramid_sacrud
and provide to you CRUD operations.pyramid_sacrud
and allow to kill itziggform_* - it’s abstract modules, this is what needs to be done. I like the idea of ziggurat_form so I use such names.
He takes all the resources of the settings to return them to the template
home.jinja2
. It implemented in pyramid_sacrud.views.sa_home()
.
He takes all rows of resource, paginate it and return to template list.jinja2
.
It implemented in pyramid_sacrud.views.CRUD.List
. For select action
used sacrud
and sacrud.action.CRUD.read()
.
He delete selected row and redirect to list of rows. It implemented in
pyramid_sacrud.views.CRUD.Delete
. For delete action used sacrud
and sacrud.action.CRUD.delete()
.
If you send GET request it return HTML form for your module. To generate form
it used sacrud_deform
. sacrud_deform generate form with schema from
ColanderAlchemy
and widgets from deform
. The main task of
sacrud_deform
is choose the right widgets from deform
and make
select widget for relationships. It implemented in
pyramid_sacrud.views.CRUD.Add
and used template create.jinja2
.
If you send POST request it validate form and do create/update action from
sacrud
respectively sacrud.action.CRUD.create()
and
sacrud.action.CRUD.update()
. It implemented in
pyramid_sacrud.views.CRUD.Add
.