Previous topic

stalker.core.models.structure

Next topic

stalker.core.models.tag

This Page

stalker.core.models.structure.Structure

Inheritance diagram of stalker.core.models.structure.Structure

class stalker.core.models.structure.Structure(project_template='', asset_templates=[], reference_templates=[], **kwargs)[source]

Bases: stalker.core.models.entity.Entity

A structure object is the place to hold data about how the physical files are arranged in the Repository.

Parameters:
  • project_template

    it is a string holding several lines of text showing the folder structure of the project. Whenever a project is created, folders are created by looking at this folder template.

    The template string can have Jinja2 directives. These variables are given to the template engine:

    • project: holds the current Project object using this structure, so you can use {{project.code}} or {{project.sequences}} kind of variables in the Jinja2 template
  • asset_templates

    holds TypeTemplate objects with an AssetType connected to its type attribute, which can help specifying templates based on the related AssetType object.

    Testing a second paragraph addition.

  • reference_templates – holds TypeTemplate objects, which can help specifying templates based on the given LinkType object

This templates are used in creation of Project folder structure and also while interacting with the assets and references in the current Project. You can create one project structure for Commmercials and another project structure for Movies and another one for Print projects etc. and can reuse them with new projects.

__init__(project_template='', asset_templates=[], reference_templates=[], **kwargs)[source]

Methods

__init__(**kwargs[, project_template, ...])

Attributes

asset_templates A list of
code
created_by gets and sets the User object who has created this
date_created gets and sets the datetime.datetime object which shows when
date_updated gets and sets the datetime.datetime object which shows when
description the description of the entity
name the name of the entity
nice_name this is the nice name of the SimpleEntity. It has the same
notes all the notes about this entity, it should be a list of Notes
project_template A string which shows the folder structure of the current project.
reference_templates A list of
tags a list of Tag objects which shows the related tags to the
updated_by gets and sets the User object who has updated this
asset_templates[source]

A list of TypeTemplate objects which gives information about the Asset Version file placements

reference_templates[source]

A list of TypeTemplate objects which gives information about the placement of references to entities

created_by

gets and sets the User object who has created this AuditEntity

date_created

gets and sets the datetime.datetime object which shows when this object has been created

date_updated

gets and sets the datetime.datetime object which shows when this object has been updated

description

the description of the entity

name

the name of the entity

nice_name

this is the nice name of the SimpleEntity. It has the same value with the name (contextually) but with a different format like, all the whitespaces replaced by underscores (“_”), all the CamelCase form will be expanded by underscore (_) characters and it is always lowercase.

There is also the code attribute which is simple the uppercase form of nice_name if it is not defined differently (i.e set to another value).

notes

all the notes about this entity, it should be a list of Notes objects or an empty list, None is not accepted

tags

a list of Tag objects which shows the related tags to the entity

updated_by

gets and sets the User object who has updated this AuditEntity

project_template[source]

A string which shows the folder structure of the current project. It can have Jinja2 directives. See the documentation of Structure object for more information