Welcome to mf-pyramid’s documentation!¶
Contents:
- class mfpyramid.dashboard.Dashboard[source]¶
Manage administration dashboard for pyramid
- static add_dashboard(klasses, config=None, prefix='')[source]¶
Adds a list of class to the dashboard
Parameters: - klasses (list) – list of object class to add to the dashboard
- config (pyramid.config.Configurator) – Pyramid Configurator
- prefix (str) – optional prefix to add in front of the routes
- mfpyramid.views.mf_delete(request)[source]¶
Delete an object If object has a function “my()”, then the function is called to get a filter on the request
Parameters: request (IMultiDict) – HTTP params Returns: json - Status fo the operation
- mfpyramid.views.mf_edit(request)[source]¶
Update an object in database
Parameters: request (IMultiDict) – HTTP params Returns: json - Status of update and updated object
- mfpyramid.views.mf_filter(objname, control, request=None)[source]¶
Return a mongo filter on object. It calls, if exists, the my method of the current object and returns the filter obtained from this method. :param objname: Name of the current object :type objname: str :param control: Type of operation :type control: MF_READ or MF_EDIT :param request: Current request :type request: pyramid.request :return: filter to use (dict)
- mfpyramid.views.mf_list(request)[source]¶
Returns a JSON list of the object defined in the route If object has a function “my()”, then the function is called to get a filter on the request
Parameters: request (IMultiDict) – HTTP params Returns: json - List of objects
- mfpyramid.views.mf_search(request)[source]¶
Returns a JSON list of objects matching criteria on object
Returns: json - List of objects