Skip to main content

Handles the lifecycle of objects for the Horae resource planning system

Project description

Introduction

horae.lifecycle handles the lifecycle of objects for the Horae resource planning system. It stores the creator, creation_date, modifier and modification_date of objects implementing horae.lifecycle.interfaces.ILifecycleAware. Additionally it provides a viewlet displaying the collected information in context and a storage for latest objects of a user which tracks what objects were changed by a given user.

Usage

The easiest way to activate the functionality provided by horae.lifecycle is to subclass from the provided mix in class horae.lifecycle.lifecycle.LifecycleAwareMixin:

import grok

from horae.lifecycle import lifecycle

class SampleContent(grok.Model, lifecycle.LifecycleAwareMixin):
    """ Sample content aware of his lifecycle
    """

Latest

The latest storage is provided as an adapter implementing horae.lifecycle.interfaces.ILatest and adapting a principal. There is a convenience adapter adapting the request available which returns the storage for the current user:

from horae.lifecycle import interfaces

class SampleView(grok.View):

    def latest(self):
        latest = interfaces.ILatest(self.request)
        return latest.objects()

Dependencies

Horae

Third party

Changelog

1.0a1 (2012-01-16)

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

horae.lifecycle-1.0a1.tar.gz (5.7 kB view details)

Uploaded Source

File details

Details for the file horae.lifecycle-1.0a1.tar.gz.

File metadata

File hashes

Hashes for horae.lifecycle-1.0a1.tar.gz
Algorithm Hash digest
SHA256 07a0d558d7f111cea7c7d589ebe095842accb0c0053ae7e100fee761e77de8b3
MD5 ebf75008e2bb2aa785d21aead9b8c821
BLAKE2b-256 4d58bb301d7a9c6ba0aeaf7993084e6f56dc87d06cc0fcef9c7f640be5246ad4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page