https://github.com/senaite/senaite.app.supermodel
A beautiful content wrapper for SENAITE that you will love
https://github.com/senaite/senaite.app.supermodel
archetypes dexterity plone python senaite
Last synced: 5 months ago
JSON representation
A beautiful content wrapper for SENAITE that you will love
- Host: GitHub
- URL: https://github.com/senaite/senaite.app.supermodel
- Owner: senaite
- License: gpl-2.0
- Created: 2018-07-19T07:04:19.000Z (about 7 years ago)
- Default Branch: 2.x
- Last Pushed: 2025-04-04T08:51:04.000Z (6 months ago)
- Last Synced: 2025-04-18T11:50:08.630Z (6 months ago)
- Topics: archetypes, dexterity, plone, python, senaite
- Language: Python
- Homepage: https://www.senaite.com
- Size: 407 KB
- Stars: 3
- Watchers: 5
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.rst
- License: LICENSE
Awesome Lists containing this project
README
## About
The SENAITE.APP.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.app.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](src/senaite.app.supermodel/docs/SUPERMODEL.rst)
to see the super powers of the `SuperModel` in action.## Installation
SENAITE.APP.SUPERMODEL is a dependency of SENAITE.CORE and therefore no
additional installation steps are required.## License
**SENAITE.APP.SUPERMODEL** Copyright (C) RIDING BYTES & NARALABS
This program is free software; you can redistribute it and/or modify it under
the terms of the [GNU General Public License version
2](https://github.com/senaite/senaite.app.supermodel/blob/master/LICENSE)
as published by the Free Software Foundation.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.