stalker.core.models.entity.SimpleEntity

Inheritance diagram of stalker.core.models.entity.SimpleEntity

class stalker.core.models.entity.SimpleEntity(name=None, description='', created_by=None, updated_by=None, date_created=datetime.datetime(2011, 1, 10, 12, 15, 4, 352608), date_updated=datetime.datetime(2011, 1, 10, 12, 15, 4, 352620))[source]

Bases: object

The base class of all the others

This class has the basic information about an entity which are the name, the description, tags and the audit information like created_by, updated_by, date_created and date_updated about this entity. It also creates a nice_name attribute which filters the white space around and in the name attribute.

Parameters:
  • name – a string or unicode attribute that holds the name of this entity. it could not be empty, the first letter should be an upper case alphabetic (not alphanumeric) and it should not contain any white space at the beggining and at the end of the string
  • description – a string or unicode attribute that holds the description of this entity object, it could be an empty string, and it could not again have white spaces at the beggining and at the end of the string
  • created_by – the created_by attribute should contain a User object who is created this object
  • updated_by – the updated_by attribute should contain a User object who is updated the user lastly. the created_by and updated_by attributes should point the same object if this entity is just created
  • date_created – the date that this object is created. it should be a time before now
  • date_updated – this is the date that this object is updated lastly. for newly created entities this is equal to date_created and the date_updated cannot be before date_created
__init__(name=None, description='', created_by=None, updated_by=None, date_created=datetime.datetime(2011, 1, 10, 12, 15, 4, 352608), date_updated=datetime.datetime(2011, 1, 10, 12, 15, 4, 352620))[source]

Methods

__init__(1, 10, 12, 15, 4, 1, 10, 12, 15, 4)

Attributes

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 is a string which is a little bit more formatted than the name attribute
updated_by gets and sets the User object who has updated this
created_by[source]

gets and sets the User object who has created this AuditEntity

date_created[source]

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

date_updated[source]

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

description[source]

the description of the entity

name[source]

the name of the entity

nice_name

this is the nice name of the SimpleEntity, it is a string which is a little bit more formatted than the name attribute

updated_by[source]

gets and sets the User object who has updated this AuditEntity

Previous topic

stalker.core.models.entity

Next topic

stalker.core.models.entity.Entity

This Page