Skip to main content

A Django layout composition library — assemble pages from independent views, rendered concurrently

Project description

dj-layouts

CI PyPI version Python versions Django License: MIT

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 →

Quick start

pip install dj-layouts
# 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>")
# 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/.

Contributing

See CONTRIBUTING.md.

Security

See SECURITY.md.

Licence

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dj_layouts-0.0.1.tar.gz (88.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dj_layouts-0.0.1-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

Details for the file dj_layouts-0.0.1.tar.gz.

File metadata

  • Download URL: dj_layouts-0.0.1.tar.gz
  • Upload date:
  • Size: 88.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for dj_layouts-0.0.1.tar.gz
Algorithm Hash digest
SHA256 28821f563ca57949af8619af791d58669cbb3e751708cf30f64063e99c71a9d0
MD5 21637cde3636a44b0c0ce2407139521a
BLAKE2b-256 a1ee2322e16bf560da9fd327e1b11c2206dbb5a13a0f2159fedca0d7d9dfbe41

See more details on using hashes here.

File details

Details for the file dj_layouts-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: dj_layouts-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 28.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for dj_layouts-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 23a57cc22bdb03af3d007a1f4733e4e95062f7f77242a4fc902fd2120643e269
MD5 eaf9e1a62f64a737d1ae5e68837b99c0
BLAKE2b-256 9c9ca65bc98d4392c10ba5082b6849a91e66420b6471b91770fa5f02f8061519

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page