noc.lib.app.docinline

Module Contents

class noc.lib.app.docinline.DocInline(model)

Bases: object

OK = 200
CREATED = 201
DELETED = 204
BAD_REQUEST = 400
FORBIDDEN = 401
NOT_FOUND = 404
CONFLICT = 409
NOT_HERE = 410
INTERNAL_ERROR = 500
NOT_IMPLEMENTED = 501
THROTTLED = 503
ignored_params = ['_dc']
page_param = __page
start_param = __start
limit_param = __limit
sort_param = __sort
format_param = __format
query_param = __query
only_param = __only
query_fields = []
query_condition = startswith
int_query_fields = []
pk_field_name
clean_fields
custom_fields
contribute_to_class(self, app, name)
set_app(self, app)
get_custom_fields(self)
get_Q(self, request, query)

Prepare Q statement for query

queryset(self, request, query=None)

Filter records for lookup

clean(self, data, parent)

Clean up input data :param data: dict of parameters :type data: dict :return: dict of cleaned parameters of raised InterfaceTypeError :rtype: dict

cleaned_query(self, q)
instance_to_dict(self, o, fields=None)
list_data(self, request, formatter, parent=None)

Returns a list of requested object objects

api_list(self, request, parent)
api_create(self, request, parent)
api_read(self, request, parent, id)

Returns dict with object’s fields and values

api_update(self, request, parent, id)
api_delete(self, request, parent, id)