========
* Added a new class called EntityType to hold all the available class names and
capabilities.
* Version class now has a new attribute called ``inputs`` to hold the inputs of
the current Version instance. It is a list of Link instances.
* FilenameTemplate classes ``path`` and ``filename`` attributes are no more
converted to string, so given a non string value will raise TypeError.
* Structure.custom_template now only accepts strings and None, setting it to
anything else will raise a TypeError.
* Two Type's for FilenameTemplate's are created by default when initializing
the database, first is called "Version" and it is used to define
FilenameTemplates which are used for placing Version source files. The second
one is called "Reference" and it is used when injecting references to a given
class. Along with the FilenameTemplate.target_entity_type this will allow one
to create two different FilenameTemplates for one class::
first get the Types
vers_type = Type.query()\
.filter_by(target_entity_type="FilenameTemplate")\
.filter_by(type="Version")\
.first()
ref_type = Type.query()\
.filter_by(target_entity_type="FilenameTemplate")\
.filter_by(type="Reference")\
.first()
lets create a FilenameTemplate for placing Asset Version files.
f_ver = FilenameTemplate(
target_entity_type="Asset",
type=vers_type,
path="Assets/{{asset.type.code}}/{{asset.code}}/{{task.type.code}}",
filename="{{asset.code}}_{{version.take_name}}_{{task.type.code}}_v{{'%03d'|version.version_number}}{{link.extension}}"
output_path="{{version.path}}/Outputs/{{version.take_name}}"
)
and now define a FilenameTemplate for placing Asset Reference files.
no need to have an output_path here...
f_ref = FilenameTemplate(
target_entity_type="Asset",
type=ref_type,
path="Assets/{{asset.type.code}}/{{asset.code}}/References",
filename="{{link.type.code}}/{{link.id}}{{link.extension}}"
)
* stalker.db.register() now accepts only real classes instead of class names.
This way it can store more information about classes.
* Status.bg_color and Status.fg_color attributes are now simple integers. And
the Color class is removed.
* StatusMixin.status is now a ForeignKey to a the Statuses table, thus it is a
real Status instance instead of an integer showing the index of the Status in
the related StatusList. This way the Status of the object will not change if
the content of the StatusList is changed.
* Added new attribute Project.project_tasks which holds all the direct or
indirect Tasks created for that project.
* User.login_name is renamed to User.login.
* Removed the ``first_name``, ``last_name`` and ``initials`` attributes from
User class. Now the ``name`` and ``code`` attributes are going to be used,
thus the ``name`` attribute is no more the equivalent of ``login`` and the
``code`` attribute is doing what was ``initials`` doing previously.