Skip to main content

django-pattern-library

PyPI PyPI downloads Build status

UI pattern libraries for Django templates. Try our online demo.

Screenshot of the pattern library UI, with navigation, pattern rendering, and configuration

Features

This package automates the maintenance of UI pattern libraries or styleguides for Django projects, and allows developers to experiment with Django templates without having to create Django views and models.

  • Create reusable patterns by creating Django templates files as usual.
  • All patterns automatically show up in the pattern library’s interface.
  • Define data as YAML files for the templates to render with the relevant Django context.
  • Override Django Templates tags as needed to mock the template’s dependencies.
  • Document your patterns with Markdown.
  • Experimental: support for Jinja templates.

Why you need this

Pattern libraries will change your workflow for the better:

  • They help separate concerns, both in code, and between members of a development team.
  • If needed, they make it possible for UI development to happen before models and views are created.
  • They encourage code reuse – defining independent UI components, that can be reused across apps, or ported to other projects.
  • It makes it much simpler to test UI components – no need to figure out where they’re used across a site or app.

Learn more by watching our presentation – Reusable UI components: A journey from React to Wagtail.

Online demo

The pattern library is dependent on Django for rendering – but also supports exporting as a static site if needed. Try out our online demo:

Documentation

Documentation is available at torchbox.github.io/django-pattern-library, with source files in the docs directory.

Contributing

See anything you like in here? Anything missing? We welcome all support, whether on bug reports, feature requests, code, design, reviews, tests, documentation, and more. Please have a look at our contribution guidelines.

If you want to set up the project on your own computer, the contribution guidelines also contain all of the setup commands.

Nightly builds

To try out the latest features before a release, we also create builds from every commit to main. Note we make no guarantee as to the quality of those pre-releases, and the pre-releases are overwritten on every build so shouldn’t be relied on for reproducible builds. Download the latest django_pattern_library-0.0.0.dev0-py3-none-any.whl.

Credits

View the full list of contributors. BSD licensed.

Project logo from FxEmoji. Documentation website built with MkDocs, and hosted in GitHub Pages.

Metadata

Release files for django-pattern-library 1.6.0

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

Source distribution (sdist)

Source distribution for django-pattern-library 1.6.0
File Size Uploaded
django_pattern_library-1.6.0.tar.gz 31.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-pattern-library 1.6.0
File Interpreter ABI Platform
django_pattern_library-1.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 66.1 kB

Release files / django_pattern_library-1.6.0.tar.gz

Download URL django_pattern_library-1.6.0.tar.gz
Size 31.3 kB
Tags Source
SHA-256 checksum
How to use checksums
90106acfc3c9820f9c1d64c2719be882aaf47079dff172253a7f3a7a31e26142
BLAKE2b-256 checksum
How to use checksums
1bea5cffde46cdce8160b8c6662c857a75103e73a2474c42aae5f6e8a9f1d4a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.12.9 Darwin/24.6.0

Release files / django_pattern_library-1.6.0-py3-none-any.whl

Download URL django_pattern_library-1.6.0-py3-none-any.whl
Size 34.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
066fdcd9cbd38b3d691362007677f58711484dc246ce514142a967a353033fa6
BLAKE2b-256 checksum
How to use checksums
528d561e314eace85e99e7049bf5c2cb75d25f09ca353fbbc48a01e62c4b6ac0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.12.9 Darwin/24.6.0

Release history Release notifications | RSS feed

This release

1.6.0 This release

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

1 release file

0.2.2

1 release file

0.2.0

2 release files

0.1.11

1 release file

0.1.10

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

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