Build in data models

Release:0.1
Date:July 02, 2010

Camelot comes with a number of build in data models. To avoid boiler plate models needed in almost any application (like Persons, Addresses, etc.), the developer is encouraged to use these data models as a start for developing custom applications.

Persons and Organizations

class camelot.model.authentication.Address(**kwargs)
../_images/new_view_address.png
class camelot.model.authentication.AddressAdmin(app_admin, entity)
Admin with only the Address information and not the Party information
class camelot.model.authentication.ContactMechanism(**kwargs)
../_images/new_view_contactmechanism.png
class camelot.model.authentication.DirectedDirector(**kwargs)
Relation from a directed organization to a director
class camelot.model.authentication.EmployerEmployee(**kwargs)
Relation from employer to employee
class camelot.model.authentication.Organization(**kwargs)

An organization represents any internal or external organization. Organizations can include businesses and groups of individuals

../_images/new_view_organization.png
class camelot.model.authentication.Party(**kwargs)
Base class for persons and organizations. Use this base class to refer to either persons or organisations in building authentication systems, contact management or CRM
class camelot.model.authentication.Person(**kwargs)

Person represents natural persons

../_images/new_view_person.png
class camelot.model.authentication.RepresentedRepresentor(**kwargs)
Relation from a representing party to the person representing the party
class camelot.model.authentication.SharedShareholder(**kwargs)
Relation from a shared organization to a shareholder
class camelot.model.authentication.SupplierCustomer(**kwargs)
Relation from supplier to customer
camelot.model.authentication.getCurrentAuthentication()
Get the currently logged in person
camelot.model.authentication.updateLastLogin()
Update the last login of the current person to now

Batch Jobs

Most applications need to perform some scheduled jobs to process information. Users need to be able to monitor the functioning of those scheduled jobs.

These classes provide the means to store the result of batch jobs to enable the user to review or plan them.

class camelot.model.batch_job.BatchJob(**kwargs)

Information the batch job that is planned, running or has run

../_images/new_view_batchjob.png
add_exception_to_message(exception)
If an exception occurs in a batch job, this method can be used to add the stack trace of the exception to the message
add_strings_to_message(strings)
Parameter:strings – a list or generator of strings
class camelot.model.batch_job.BatchJobType(**kwargs)

The type of batch job, the user will be able to filter his jobs based on their type. A type might be ‘Create management reports’

../_images/new_view_batchjobtype.png

Auditing

class camelot.model.memento.BeforeDelete(**kwargs)
The state of the object before it is deleted
class camelot.model.memento.BeforeUpdate(**kwargs)
The state of the object before an update took place
class camelot.model.memento.Create(**kwargs)
Marks the creation of an object
class camelot.model.memento.Memento(**kwargs)

Keeps information on the previous state of objects, to keep track of changes and enable restore to that previous state

description
Change

Table Of Contents

Previous topic

Delegates

Next topic

Fixtures : handling static data in the database

This Page