Đang chuẩn bị liên kết để tải về tài liệu:
Web to py enterprise web framework - p 24

Không đóng trình duyệt đến khi xuất hiện nút TẢI XUỐNG

CRUD 215 1 def data: return dict(form=crud()) would expose the following URLs: 1 2 3 4 5 http://./[app]/[controller]/data/tables http://./[app]/[controller]/data/create/[tablename] http://./[app]/[controller]/data/read/[tablename]/[id] http://./[app]/[controller]/data/delete/[tablename] http://./[app]/[controller]/data/select/[tablename] However, the following action: 1 2 def create_tablename: return dict(form=crud.create(db.tablename)) would only expose the create method 1 http://./[app]/[controller]/create_tablename While the following action: 1 2 def update_tablename: return dict(form=crud.update(db.tablename, request.args(0))) would only expose the update method 1 http://./[app]/[controller]/update_tablename and so on. The behavior of CRUD can be customized in two ways: by setting some attributes of the crud object or by passing extra parameters to each of its methods. Attributes Here is a complete list of current CRUD attributes, their default values,. | CRUD 215 1 1 2 3 4 5 1 2 1 1 2 1 1 1 1 1 1 def data return dict form crud would expose the following URLs http . app controller data tables http . app controller data create tablename http . app controller data read tablename id http . app controller data delete tablename http . app controller data select tablename However the following action def create_tablename return dict form crud.create db.tablename would only expose the create method http . app controller create_tablename While the following action def update_tablename return dict form crud.update db.tablename request.args 0 would only expose the update method http . app controller update_tablename and so on. The behavior of CRUD can be customized in two ways by setting some attributes of the crud object or by passing extra parameters to each of its methods. Attributes Here is a complete list of current CRUD attributes their default values and meaning crud.settings.create_next request.url specifies the URL to redirect to after a successful create record. crud.settings.update_next request.url specifies the URL to redirect to after a successful update record. crud.settings.delete_next request.url specifies the URL to redirect to after a successful delete record. crud.settings.download_url URL r request f download specifies the URL to be used for linking uploaded files. crud.settings.create_onvalidation lambda form None 216 FORMS AND VALIDATORS is an optional function to be called onvalidation of create forms see SQL-FORM onvalidation 1 crud.settings.update_onvalidation lambda form None is an optional function to be called onvalidation of update forms see SQLFORM onvalidation 1 crud.settings.create_onaccept lambda form None is an optional function to be called before redirect after successful create record. This function takes the form as its only argument. 1 crud.settings.update_onaccept lambda form None is an optional function to be called before redirect after successful update record. This function takes .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.