components.template.models¶
Template models
-
class
components.template.models.Template(*args, **kwargs)¶ Bases:
django_mongoengine.document.DjangoFlavor,mongoengine.document.DocumentRepresents an XML schema template that defines the structure of data
-
exception
DoesNotExist¶ Bases:
mongoengine.errors.DoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
mongoengine.errors.MultipleObjectsReturned
-
content¶
-
dependencies¶
-
display_name¶ Return template name to display.
Returns:
-
filename¶
-
static
get_all(is_cls)¶ Return all templates.
Returns:
-
static
get_all_by_hash(template_hash)¶ Return all template having the given hash.
Parameters: template_hash – Template hash. Returns: List of Template instance.
-
static
get_all_by_hash_list(template_hash_list)¶ Return all template having the given hash list.
Parameters: template_hash_list – Template hash list. Returns: List of Template instance.
-
static
get_all_by_id_list(template_id_list)¶ Return all template with id in list.
Parameters: template_id_list – Returns:
-
static
get_all_templates_by_dependencies(dependency_id_list)¶ List all templates having the given dependencies.
Parameters: dependency_id_list – List of dependency ids. Returns: List of templates.
-
static
get_by_id(template_id)¶ Return a template by its id.
Parameters: template_id – Returns:
-
hash¶
-
id¶ A field wrapper around MongoDB’s ObjectIds.
-
exception