Skip to content
A beautiful content wrapper for SENAITE that you will love
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Added GitHub issue/PR template Oct 4, 2018
docs Do not process "0" values to Portal-SuperModels (#8) May 20, 2019
src/senaite Do not process "0" values to Portal-SuperModels (#8) May 20, 2019
static Prepare for release 1.2.0 Mar 30, 2019
templates
.gitignore Updated gitignores Mar 30, 2019
.travis.yml Added travis build file Jul 19, 2018
LICENSE
MANIFEST.in Prepare release 1.0.0 Jul 19, 2018
README.md Updated Readme Mar 30, 2019
bootstrap.py
buildout.cfg Added Destructor and further improvements (#6) Apr 30, 2019
setup.cfg
setup.py
travis.cfg first commit Jul 19, 2018

README.md

senaite.core.supermodel

A beautiful content wrapper for SENAITE that you will love

About

The SENAITE CORE SUPERMODEL is a content wrapper for objects and catalog brains in SENAITE and provides a unified dictionary interface to access the schema fields, methods and metadata.

For what is it needed?

The purpose of the SUPERMODEL is to help coders to access the data from content objects. It also ensures that the most effective and efficient method is used to achieve a task.

How does it work?

A SuperModel can be instantiated with an UID of a content object:

>>> from senaite.core.supermodel import SuperModel
>>> supermodel = SuperModel('e37c1b659137414e872c08af410f09b4')

This will give transparent access to all schema fields of the wrapped object as well to all the metadata columns of the primary catalog of this object:

>>> supermodel.MySchemaField'
'Value of MySchemaField'

Please read the full functional doctest to see the super powers of the SuperModel in action.

Installation

SENAITE.CORE.SUPERMODEL is a dependency of SENAITE.CORE and therefore no additional installation steps are required.

You can’t perform that action at this time.