Metadata-Version: 2.5
Name: entirius-django-contentdb
Version: 5.2.0
Summary: Page content module for Entirius: JSON pages, draft/publish workflow, routes, images and blog authors
Project-URL: Homepage, https://docs.entirius.com/
Project-URL: Documentation, https://github.com/entirius/entirius-django-contentdb/tree/develop/docs
Project-URL: Repository, https://github.com/entirius/entirius-django-contentdb
Project-URL: Changelog, https://github.com/entirius/entirius-django-contentdb/blob/develop/CHANGELOG.md
Project-URL: Issues, https://github.com/entirius/entirius-django-contentdb/issues
Author: Entirius
License-Expression: MPL-2.0
License-File: LICENSE
Keywords: cms,content,django,ecommerce,entirius,headless
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Django
Classifier: Framework :: Django :: 5.2
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.11
Requires-Dist: celery>=5.0
Requires-Dist: django-filter>=2.4.0
Requires-Dist: django>=4.0.0
Requires-Dist: djangorestframework-simplejwt>=5.2.0
Requires-Dist: djangorestframework>=3.12.4
Requires-Dist: drf-extra-fields>=3.1.1
Requires-Dist: drf-spectacular>=0.27.0
Requires-Dist: entirius-django-pim>=3.0.0
Requires-Dist: entirius-django-regional>=2.0.0
Requires-Dist: entirius-django-utils>=2.0.0
Requires-Dist: entirius-py-idx-normalizator>=2.0.0
Requires-Dist: entirius-py-image-transformations>=2.0.0
Requires-Dist: factory-boy>=3.2.1
Requires-Dist: pillow>=7.1.1
Requires-Dist: pydantic>=2.0
Requires-Dist: python-dateutil>=2.8.1
Requires-Dist: python-slugify>=4.0.0
Provides-Extra: dev
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: test
Requires-Dist: dj-database-url; extra == 'test'
Requires-Dist: psycopg[binary]; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-django; extra == 'test'
Description-Content-Type: text/markdown

# entirius-django-contentdb

A Django module for page content of Entirius, the open-source modular ecommerce platform: structured JSON pages with
a draft/publish workflow. It serves routes, images, channel-scoped content and blog authors over a REST API for the
storefront and the CMS.

[![PyPI](https://img.shields.io/pypi/v/entirius-django-contentdb.svg)](https://pypi.org/project/entirius-django-contentdb/)
[![Python](https://img.shields.io/pypi/pyversions/entirius-django-contentdb.svg)](https://pypi.org/project/entirius-django-contentdb/)
[![License: MPL-2.0](https://img.shields.io/badge/license-MPL--2.0-blue.svg)](https://github.com/entirius/entirius-django-contentdb/blob/develop/LICENSE)

## What it does

- Stores page content as structured JSON (sections and tiles) with a draft/publish lifecycle.
- Maps URL routes to published content and scopes content per sales channel and language.
- Uploads images with content-addressed deduplication, resizing and thumbnails.
- Manages blog authors and co-authors on drafts.
- Exposes a read-only public API for storefronts and an admin API for the CMS.

## Installation

```shell
uv add entirius-django-contentdb
pip install entirius-django-contentdb
```

```python
INSTALLED_APPS = [
    ...
    "django_regional",
    "django_utils",
    "django_pim",
    "django_contentdb",
]

# urls.py
urlpatterns = [
    path("", include("django_contentdb.urls")),
]
```

Optional settings: `CONTENTDB_THUMBNAIL_QUALITY`, `CONTENTDB_IMAGE_MAX_WIDTH`, `API_ADMIN_BASE_URL`,
`API_PUBLIC_BASE_URL`; reference with defaults in
https://github.com/entirius/entirius-django-contentdb/blob/develop/AGENTS.md (section Settings).

## Quick start

```python
from django_contentdb.services.navigation_service import get_published_navigation

navigation = get_published_navigation(
    content_type_slug="header",
    language_iso2="en",
    channel_idx="default",
)
```

## Requirements

- Python 3.11 or newer, Django 4.0 or newer.
- PostgreSQL (published-content queries use `DISTINCT ON`).
- Entirius packages pulled in: `entirius-django-pim`, `entirius-django-regional`, `entirius-django-utils`,
  `entirius-py-idx-normalizator`, `entirius-py-image-transformations`.

## Documentation

- Module docs: https://github.com/entirius/entirius-django-contentdb/tree/develop/docs
- Entirius documentation: https://docs.entirius.com/
- Changelog: https://github.com/entirius/entirius-django-contentdb/blob/develop/CHANGELOG.md

## Part of Entirius

This module runs inside the Entirius backend service (Volkanos), next to the product and regional modules.

- Backend service: https://github.com/entirius/entirius-service-volkanos
- Docker harness: https://github.com/entirius/entirius-zeno
- Sibling modules: https://github.com/entirius/entirius-django-pim, https://github.com/entirius/entirius-django-regional,
  https://github.com/entirius/entirius-django-contentdb-translator

## Development

```shell
make install     # sync dependencies (uv)
make check       # lint + format check (ruff)
make test        # test suite (pytest + pytest-django, needs PostgreSQL via DATABASE_URL)
```

Development and agent instructions: https://github.com/entirius/entirius-django-contentdb/blob/develop/AGENTS.md

## License

Mozilla Public License 2.0 (MPL-2.0) — see https://github.com/entirius/entirius-django-contentdb/blob/develop/LICENSE.
