Overview
This package contains common code for the SFMOMA website and collection projects, such as:
Abstract collection models.
Database routers.
Elastic Search integration.
Abstract and concrete models
You must implement concrete versions of each abstract collection model in an app named collection within your project.
This will allow you to define different methods and behaviour for the models in each project (as if they were proxy models), but without any foreign key problems (as with proxy models).
Even if multiple projects access a shared database with different concrete collection implementations, only one set of migrations will be defined in the collection_migrations app, and they can be applied by any project.
Model import paths will be the same, so it should be possible to swap in a different concrete implementation by factoring it out of the project into a standalone app and then substituting it for another.
Projects that use a collection app MUST include the following setting to ensure the database is consistent across projects:
MIGRATION_MODULES = {
'collection': 'collection_migrations',
}
These migrations are stored in the top level collection_migrations package, instead of collection_models.migrations, because collection_models is installed into projects and that confuses Django.
Elastic Search Integration
Install the collection_models.search app and use the index_collection management command to populate the search index:
$ ./manage.py index_collection
Metadata
Release files for glamkit-collections 0.36
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| glamkit_collections-0.36-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Release files / glamkit_collections-0.36-py2.py3-none-any.whl
| Download URL | glamkit_collections-0.36-py2.py3-none-any.whl |
|---|---|
| Size | 64.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e634c6698a28edc9a258a8d92b4f01118f54ff3cbaa8ad6ade11bac8301e970c
|
|
BLAKE2b-256 checksum How to use checksums |
028891460d6e5a524094ceaa31d3bffcbfbcc1eaa0a4ea1bc54d9d995125c419
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for glamkit-collections 0.36
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.