Skip to main content

MCMS Content

mcms_content defines MCMS-specific content field semantics for Django models. It provides a canonical MCMS representation of fields while allowing Django to remain the source of truth for database structure and persistence.

Responsibilities

  • Define the canonical MCMS FieldDefinition representation.
  • Derive MCMS field definitions from Django model fields and optional MCMS-specific model configuration.
  • Inspect Django model metadata through Model._meta.
  • Support MCMS-specific field metadata, such as editor widgets and CMS capabilities.
  • Validate MCMS field configuration against corresponding Django model fields.
  • Provide a consistent field representation for editor behaviour, validation, serialization, documentation, and other MCMS features.

Architecture decision

Django model definitions remain authoritative for database schema and persistence. Django migrations continue to manage database changes.

FieldDefinition is the canonical representation of field semantics within MCMS; it is not a replacement for Django model fields and does not generate the database schema.

MCMS derives field definitions by inspecting Django model metadata and combining it with optional MCMS-specific configuration declared on the model.

Django Model
    |
    | Model._meta
    |
    +--> Django Field Metadata
    |
    +--> Optional MCMS Configuration
              |
              v
       Field Definition Resolution
              |
              v
        FieldDefinition
              |
              +--> MCMS Editor and CMS Capabilities

Avoid duplicating Django metadata

MCMS should derive properties already available from Django rather than requiring developers to declare them again.

Examples include:

  • Primary-key status.
  • Nullability.
  • Defaults.
  • Uniqueness.
  • Maximum length.
  • Database indexes and constraints, where applicable.

MCMS metadata should describe CMS-specific behaviour, for example:

  • Editor widget and widget configuration.
  • Searchable or sortable capabilities.
  • CMS-specific validation and behaviour.
  • Serialization hints.
  • Documentation metadata.

MCMS should use appropriate defaults when optional MCMS metadata is absent.

MCMS-specific configuration must not override database-level constraints or persistence behaviour defined by Django.

Example

The following is illustrative of the intended relationship; use the actual field constructors and metadata API implemented by this package.

from django.db import models


class Article(models.Model):
    title = models.CharField(max_length=255)
    body = models.TextField()

    class MCMS:
        # MCMS-specific field metadata belongs here.
        ...

The Django fields continue to define the database columns. MCMS inspects the Django model fields and any supported MCMS metadata to derive normalized FieldDefinition objects.

Architectural integrations

Package / system Relationship
Django models Source of truth for database fields and persistence
mcms_core Shared domain infrastructure and common exception conventions

mcms_content maintains the separation between Django persistence definitions and MCMS field semantics. Field definition resolution does not generate Django model fields or manage database schema.

Confirm direct imports and declared package dependencies in the implementation.

Application configuration

This package contains a field registry which holds MCMS field types registered for use within the package.

The registry provides access to registered MCMS field types and their definitions.

Dependencies

Architectural integrations

Django model metadata and optional MCMS model configuration are inputs to field definition resolution. MCMS field semantics are the resulting normalized representation.

The package must not become the owner of Django database schema or migrations.

Python distribution dependencies

MCMS packages rely on Django.

Development

uv run pytest packages/mcms-content/tests

Run the repository-configured Ruff and mypy checks where applicable.

Metadata

Release files for mcms-content 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for mcms-content 0.1.0
File Interpreter ABI Platform Actions
mcms_content-0.1.0-py3-none-any.whl Python 3 none any Details for mcms_content-0.1.0-py3-none-any.whl

Release files / mcms_content-0.1.0-py3-none-any.whl

Download URL mcms_content-0.1.0-py3-none-any.whl
Size 35.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9537b4f184f6a448481efd29f119be15e2055239b39387411f4492fb2b44ae51
BLAKE2b-256 checksum
How to use checksums
3247a0854399ddf4cebb5ce3e7eb2b8879df655644ff4b906033dcf9ffb1db7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"21.3","id":"virginia","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for mcms-content 0.1.0

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page