Inspection

The inspection module provides users and 3rd-party library developers a public api to access booby objects and classes internal data, such as defined fields, and some low-level type validations.

This module is based on the Python inspect module.

inspection.get_fields(model)[source]

Returns a dict mapping the given model field names to their fields.Field objects.

Parameters:model – The models.Model subclass or instance you want to get their fields.
Raises :TypeError if the given model is not a model.
inspection.is_model(obj)[source]

Returns True if the given object is a models.Model instance or subclass. If not then returns False.

Read the Docs v: 0.5.0
Versions
latest
0.5.0
0.4.0
0.3.0
0.2.3
Downloads
PDF
HTML
Epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.