Metadata-Version: 2.4
Name: dj-layouts
Version: 0.0.1
Summary: A Django layout composition library — assemble pages from independent views, rendered concurrently
Project-URL: Homepage, https://fukalite.github.io/dj-layouts/
Project-URL: Repository, https://github.com/fukalite/dj-layouts
Project-URL: Documentation, https://fukalite.github.io/dj-layouts/
Project-URL: Bug Tracker, https://github.com/fukalite/dj-layouts/issues
Project-URL: Changelog, https://github.com/fukalite/dj-layouts/blob/main/CHANGELOG.md
Maintainer: marcelkornblum
License: MIT
License-File: LICENSE
Keywords: async,django,htmx,layouts,page composition,panels
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django
Classifier: Framework :: Django :: 5.2
Classifier: Framework :: Django :: 6.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Requires-Python: >=3.13
Requires-Dist: django<8,>=5.2
Provides-Extra: dev
Requires-Dist: djlint; extra == 'dev'
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material; extra == 'docs'
Requires-Dist: mkdocstrings-python; extra == 'docs'
Provides-Extra: testing
Requires-Dist: coverage; extra == 'testing'
Requires-Dist: factory-boy; extra == 'testing'
Requires-Dist: playwright; extra == 'testing'
Requires-Dist: pytest-asyncio; extra == 'testing'
Requires-Dist: pytest-cov; extra == 'testing'
Requires-Dist: pytest-django; extra == 'testing'
Requires-Dist: pytest-mock; extra == 'testing'
Requires-Dist: pytest-playwright; extra == 'testing'
Description-Content-Type: text/markdown

# dj-layouts

[![CI](https://github.com/fukalite/dj-layouts/actions/workflows/ci.yml/badge.svg)](https://github.com/fukalite/dj-layouts/actions/workflows/ci.yml)
[![PyPI version](https://img.shields.io/pypi/v/dj-layouts?label=PyPI)](https://pypi.org/project/dj-layouts/)
[![Python versions](https://img.shields.io/badge/python-3.13%20%7C%203.14-blue)](https://pypi.org/project/dj-layouts/)
[![Django](https://img.shields.io/badge/django-5.2%20%7C%206.0%20%7C%20latest-green)](https://www.djangoproject.com/)
[![License: MIT](https://img.shields.io/badge/license-MIT-yellow)](LICENSE)

A Django layout composition library. Views return their own content as partials; a `Layout` class assembles the full page by calling other views as named panels, concurrently under ASGI.

**[Read the docs →](https://fukalite.github.io/dj-layouts/)**

## Quick start

```bash
pip install dj-layouts
```

```python
# myapp/layouts.py
from dj_layouts import Layout, Panel

class DefaultLayout(Layout):
    template = "layouts/default.html"
    navigation = Panel("core:navigation")
    footer = Panel("<p>© Acme</p>")
```

```python
# myapp/views.py
from dj_layouts import layout

@layout(DefaultLayout)
def homepage(request):
    return render(request, "home/index.html", {"items": get_items()})
```

## Supported versions

| Python | Django    |
| ------ | --------- |
| 3.13   | 5.2 (LTS) |
| 3.14   | 6.0       |
|        | latest    |

## Documentation

Full documentation at **[fukalite.github.io/dj-layouts/](https://fukalite.github.io/dj-layouts/)**.

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md).

## Security

See [SECURITY.md](SECURITY.md).

## Licence

[MIT](LICENSE)
