stalker.models.link.Link¶
-
class
stalker.models.link.
Link
(full_path=”, original_filename=”, **kwargs)[source]¶ Bases:
stalker.models.entity.Entity
Holds data about external links.
Links are all about giving some external information to the current entity (external to the database, so it can be something on the
Repository
or in the Web or anywhere that the server can reach). The type of the link (general, file, folder, web page, image, image sequence, video, movie, sound, text etc.) can be defined by aType
instance (you can also use multipleTag
instances to add more information, and to filter them back). Again it is defined by the needs of the studio.For sequences of files the file name should be in “%h%p%t %R” format in PySeq formatting rules.
There are three secondary attributes (properties to be more precise)
path
,filename
andextension
. These attributes are derived from thefull_path
attribute and they modify it.- Path
- It is the path part of the full_path
- Filename
- It is the filename part of the full_path, also includes the extension, so changing the filename also changes the extension part.
- Extension
- It is the extension part of the full_path. It also includes the extension separator (‘.’ for most of the file systems).
Parameters: full_path – The full path to the link, it can be a path to a folder or a file in the file system, or a web page. For file sequences use “%h%p%t %R” format, for more information see PySeq Documentation. It can be set to empty string (or None which will be converted to an empty string automatically). -
__init__
(full_path=”, original_filename=”, **kwargs)¶
Methods
__init__
([full_path, original_filename])Attributes
created_by
The User
who has created this object.created_by_id
The id of the User
who has created this entity.date_created
A datetime.datetime
instance showing the creation date and time of this object.date_updated
A datetime.datetime
instance showing the update date and time of this object.description
Description of this object. entity_groups
entity_id
entity_type
extension
the extension property filename
the filename property full_path
The full path of the url to the link. generic_data
This attribute can hold any kind of data which exists in SOM. generic_text
This attribute can hold any text. html_class
html_style
id
link_id
metadata
name
Name of this object nice_name
Nice name of this object. notes
All the Notes
s attached to this entity.original_filename
path
the path property plural_class_name
the plural name of this class query
tags
A list of tags attached to this object. thumbnail
thumbnail_id
tjp_id
returns TaskJuggler compatible id to_tjp
renders a TaskJuggler compliant string used for TaskJuggler type
The type of the object. type_id
The id of the Type
of this entity.updated_by
The User
who has updated this object.updated_by_id
The id of the User
who has updated this entity.-
full_path
¶ The full path of the url to the link.
-
path
¶ the path property
-
date_created
¶ A
datetime.datetime
instance showing the creation date and time of this object.
-
date_updated
¶ A
datetime.datetime
instance showing the update date and time of this object.
-
description
¶ Description of this object.
-
filename
¶ the filename property
-
generic_data
¶ This attribute can hold any kind of data which exists in SOM.
-
generic_text
¶ This attribute can hold any text.
-
name
¶ Name of this object
-
nice_name
¶ Nice name of this object.
It has the same value with the name (contextually) but with a different format like, all the white spaces replaced by underscores (“_”), all the CamelCase form will be expanded by underscore (_) characters and it is always lower case.
-
notes
¶ All the
Notes
s attached to this entity.It is a list of
Note
instances or an empty list, setting it to None will raise a TypeError.
-
plural_class_name
¶ the plural name of this class
A list of tags attached to this object.
It is a list of
Tag
instances which shows the tags of this object
-
tjp_id
¶ returns TaskJuggler compatible id
-
to_tjp
¶ renders a TaskJuggler compliant string used for TaskJuggler integration. Needs to be overridden in inherited classes.
-
type
¶ The type of the object.
It is a
Type
instance with a properType.target_entity_type
.
-
type_id
¶ The id of the
Type
of this entity. Mainly used by SQLAlchemy to create a Many-to-One relates between SimpleEntities and Types.
-
extension
¶ the extension property