rest_witchcraft.field_mapping module

Field mapping from SQLAlchemy type’s to DRF fields.

rest_witchcraft.field_mapping.get_detail_view_name(model)[source]

Given a model class, return the view name to use for URL relationships that rever to instances of the model.

rest_witchcraft.field_mapping.get_field_type(column)[source]

Returns the field type to be used determined by the sqlalchemy column type or the column type’s python type.

rest_witchcraft.field_mapping.get_url_kwargs(model)[source]

Gets kwargs for the UriField.