get_callable
Return a callable corresponding to lookup_view. * If lookup_view is already a callable, return it. * If lookup_view is a string import path that can be resolved to a callable, import that callable and return it, otherwise raise an exception (ImportError or ViewDoesNotExist).
def get_callable(
lookup_view: string|callable
) - > callable
Return a callable corresponding to lookup_view.
- If lookup_view is already a callable, return it.
- If lookup_view is a string import path that can be resolved to a callable, import that callable and return it, otherwise raise an exception (ImportError or ViewDoesNotExist).
Parameters
| Name | Type | Description |
|---|---|---|
| lookup_view | `string | callable` |
Returns
| Type | Description |
|---|---|
callable | The resolved callable object or the original function if already callable. |