shoop.admin.template_helpers package¶
Submodules¶
shoop.admin.template_helpers.shoop_admin module¶
This module is installed as the shoop_admin
template function namespace.
-
shoop.admin.template_helpers.shoop_admin.
model_url
(model, kind='detail', default=None)[source]¶ Get a model URL of the given kind for a model (instance or class).
Parameters: - model (django.db.Model) – The model instance or class.
- kind (str) – The URL kind to retrieve. See
get_model_url
. - default (str|None) – Default value to return if model URL retrieval fails. If None,
the
NoModelUrl
exception is (re)raised.
Returns: URL string.
Return type: