Skip to content

Commit f363c99

Browse files
authored
Merge pull request #4 from dchukhin/django_5_2
Add Django 5.2 Support
2 parents 33a322c + 0182512 commit f363c99

File tree

78 files changed

+3106
-6301
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+3106
-6301
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
12-
- run: pipx install "poetry>=1.1.12,<2"
12+
- run: pipx install "poetry>=2.1.2,<3"
1313
- uses: actions/setup-python@v5
1414
with:
15-
python-version: "3.12"
16-
cache: 'poetry'
15+
python-version: "3.13"
16+
cache: "poetry"
1717
- run: pip install tox
18-
- run: tox -e lint,py312-dj51
18+
- run: tox -e lint,py313-dj51
1919
test_compatibility:
2020
needs: test
2121
runs-on: ubuntu-latest
@@ -29,14 +29,16 @@ jobs:
2929
- python: "3.9"
3030
toxenv: py39-dj42
3131
- python: "3.10"
32-
toxenv: py310-dj42,py310-dj50,py311-dj51,py310-djmain
32+
toxenv: py310-dj42,py310-dj51,py310-dj52
3333
- python: "3.11"
34-
toxenv: py311-dj42,py311-dj50,py311-dj51,py311-djmain
34+
toxenv: py311-dj42,py311-dj51,py311-dj52
3535
- python: "3.12"
36-
toxenv: py312-dj42,py312-djmain
36+
toxenv: py312-dj42,py312-dj52
37+
- python: "3.13"
38+
toxenv: py313-dj42,py313-dj52,py312-djmain
3739
steps:
3840
- uses: actions/checkout@v4
39-
- run: pipx install "poetry>=1.1.12,<2"
41+
- run: pipx install "poetry>=2.1.2,<3"
4042
- uses: actions/setup-python@v5
4143
with:
4244
python-version: ${{ matrix.python }}
@@ -52,7 +54,7 @@ jobs:
5254
- uses: actions/checkout@v4
5355
- uses: actions/setup-node@v4
5456
with:
55-
node-version-file: '.nvmrc'
57+
node-version-file: ".nvmrc"
5658
- id: node-cache
5759
uses: actions/cache@v3
5860
with:
@@ -62,11 +64,11 @@ jobs:
6264
- if: steps.node-cache.outputs.cache-hit != 'true'
6365
run: npm ci --no-audit
6466
- run: npm run build
65-
- run: pipx install "poetry>=1.1.12,<2"
67+
- run: pipx install "poetry>=2.1.2,<3"
6668
- uses: actions/setup-python@v5
6769
with:
6870
python-version-file: pyproject.toml
69-
cache: 'poetry'
71+
cache: "poetry"
7072
- run: poetry install
7173
- run: poetry run django-admin runserver --settings=tests.settings.production --pythonpath=. &
7274
# Docs website build.

.gitpod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ tasks:
1010
# initialise and install the python part of the app by installing poetry
1111
# and the python dependencies
1212
- init: |
13-
pip install "poetry>=1.1.12,<2"
13+
pip install "poetry>=2.1.2,<3"
1414
poetry install
1515
gp sync-done python
1616
# Start the server for testing

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16
1+
23

CHANGELOG.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,60 @@
11
# Changelog
22

3+
## [Unreleased]
4+
5+
## [1.5.0](https://github.com/torchbox/django-pattern-library/releases/tag/v1.5.0) - 2025-04-08
6+
7+
### Added
8+
9+
- Add experimental Jinja support ([#180](https://github.com/torchbox/django-pattern-library/discussions/180), [#247](https://github.com/torchbox/django-pattern-library/pull/247), [#254](https://github.com/torchbox/django-pattern-library/pull/254)). Thank you to [@gone](https://github.com/gone), [@luord](https://github.com/luord), [@edcohen08](https://github.com/edcohen08), [@maribedran](https://github.com/maribedran), [@CuriousLearner](https://github.com/CuriousLearner)!
10+
11+
### Maintenance
12+
13+
- Update front-end tooling dependencies to latest versions
14+
15+
### Documentation
16+
17+
- Update Complementary packages list with recent options ([django-bird](https://github.com/joshuadavidthomas/django-bird), [dj-angles](https://github.com/adamghill/dj-angles), [django-cotton](https://github.com/wrabit/django-cotton))
18+
19+
## [1.4.1](https://github.com/torchbox/django-pattern-library/releases/tag/v1.4.1) - 2025-04-08
20+
21+
### Fixed
22+
23+
- Include static files in wheel build of the package
24+
25+
## [1.4.0](https://github.com/torchbox/django-pattern-library/releases/tag/v1.4.0) - 2025-04-08
26+
27+
Yanked from PyPI as its wheel was missing the pattern library’s static files.
28+
29+
### Added
30+
31+
- Add support for Django 5.2 ([#253](https://github.com/torchbox/django-pattern-library/issues/253))
32+
- Add emoji favicon to avoid favicon.ico requests from the browser
33+
34+
### Removed
35+
36+
- Remove Django `<6.0` dependency upper bound, allowing installs of arbitrary future Django versions
37+
38+
## [1.3.0](https://github.com/torchbox/django-pattern-library/releases/tag/v1.3.0) - 2024-12-11
39+
40+
### Added
41+
42+
- Add support for Django 5.1 ([#251](https://github.com/torchbox/django-pattern-library/pull/251))
43+
44+
### Removed
45+
46+
- Drop support for Python 3.8 ([#251](https://github.com/torchbox/django-pattern-library/pull/251))
47+
- Drop support for Django 4.1 ([#242](https://github.com/torchbox/django-pattern-library/pull/242))
48+
49+
### Documentation
50+
51+
- Note requirement for `.md` extension for pattern documentation files ([#248](https://github.com/torchbox/django-pattern-library/pull/248))
52+
- Mention complementary package django-viewcomponent, and django-lookbook as an alternative. ([#250](https://github.com/torchbox/django-pattern-library/pull/250))
53+
54+
### Maintenance
55+
56+
- Test with Python 3.12 ([#242](https://github.com/torchbox/django-pattern-library/pull/242))
57+
358
## [1.2.0](https://github.com/torchbox/django-pattern-library/releases/tag/v1.2.0) - 2024-01-16
459

560
### Added

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
This document contains information for anyone wishing to contribute to the project.
44

5-
65
## Installation
76

87
The repo includes a simple test application that can be run to develop the pattern library itself. Give it a try by [opening django-pattern-library in Gitpod](https://gitpod.io/#https://github.com/torchbox/django-pattern-library), or follow the instructions below for a local setup.
@@ -150,4 +149,4 @@ On the `main` branch:
150149

151150
Verify that the pattern library is working as you expect it to on your local build.
152151

153-
8. Upload the latest version to PyPI (requires credentials, ask someone named in `pyproject.toml` authors): `poetry publish`
152+
8. Upload the latest version to PyPI (requires credentials, ask someone named in the [maintainers listed on PyPI](https://pypi.org/project/django-pattern-library/)): `poetry publish`

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ENV PATH=/venv/bin:/home/dpl/.local/bin:$PATH \
1313

1414
USER dpl
1515

16-
RUN pip install --user "poetry>=1.1.12,<2" && \
16+
RUN pip install --user "poetry>=2.1.2,<3" && \
1717
python -m venv /venv/
1818

1919
COPY pyproject.toml ./

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ This package automates the maintenance of UI pattern libraries or styleguides fo
1313
- Create reusable patterns by creating Django templates files as usual.
1414
- All patterns automatically show up in the pattern library’s interface.
1515
- Define data as YAML files for the templates to render with the relevant Django context.
16-
- Override Django templates tags as needed to mock the template’s dependencies.
16+
- Override Django Templates tags as needed to mock the template’s dependencies.
1717
- Document your patterns with Markdown.
18+
- Experimental: support for Jinja templates.
1819

1920
## Why you need this
2021

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ services:
1616

1717
frontend:
1818
command: npm start
19-
image: node:16
19+
image: node:23
2020
user: node
2121
volumes:
2222
- type: bind

docs/community/related-projects.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,25 @@ Here are other projects that are related to django-pattern-library, and may be r
44

55
## Complementary packages
66

7-
- [storybook-django](https://github.com/torchbox/storybook-django) – attempting to bridge the gap between React and Django, by bringing django-pattern-library patterns into Storybook stories.
8-
- [django-components](https://github.com/EmilStenstrom/django-components/) – Reusable UI components for Django, going further than template partials.
9-
- [django-component-tags](https://github.com/syse-i/django-component-tags)Create advanced HTML components using Django Tags.
7+
To create and reuse components within Django templates:
8+
9+
- [django-components](https://github.com/django-components/django-components)Reusable UI components for Django, going further than template partials.
1010
- [slippers](https://github.com/mixxorz/slippers) – Reusable components for Django, without writing a single line of Python.
11-
- (Jinja only, incompatible but interesting) [JinjaX](https://jinjax.scaletti.dev/) – Write server-side components as single Jinja template files. Use them as HTML tags without doing any importing.
11+
- [JinjaX](https://jinjax.scaletti.dev/) – Write server-side components as single Jinja template files. Use them as HTML tags without doing any importing.
12+
- [django-viewcomponent](https://github.com/rails-inspire-django/django-viewcomponent) - Build reusable components in Django, inspired by Rails ViewComponent, the components built by django-viewcomponent can be used in both Django template or Python code.
13+
- [django-bird](https://github.com/joshuadavidthomas/django-bird) - reusable components in Django inspired by Flux from Laravel.
14+
- [dj-angles](https://github.com/adamghill/dj-angles) - HTML-like elements in Django templates in place of partials and tags.
15+
- [django-cotton](https://github.com/wrabit/django-cotton)- HTML-like syntax for Django template tags
16+
17+
Tooling leveraging component-driven development:
18+
19+
- [storybook-django](https://github.com/torchbox/storybook-django) – attempting to bridge the gap between React and Django, by bringing django-pattern-library patterns into Storybook stories.
1220

1321
## Alternatives
1422

1523
- [Storybook](https://storybook.js.org/), and in particular [Storybook for Server](https://github.com/storybookjs/storybook/tree/master/app/server) – Storybook integration with server-rendered UI components.
1624
- [Pattern Lab](http://patternlab.io/) – PHP or Node pattern library, from which this project is heavily inspired.
17-
- [Astrum](http://astrum.nodividestudio.com/) – Similar to Pattern Lab, Node based.
18-
- [rikki-patterns](https://github.com/springload/rikki-patterns) – Experimental Django-friendly pattern library generator, for Jinja2 and Nunjucks templates
19-
25+
- [django-lookbook](https://github.com/rails-inspire-django/django-lookbook) - Empower your Django development with this pluggable app for creating a robust component library. Includes preview system, documentation engine, and parameter editor for building modular UI effortlessly.
2026

2127
## Pattern libraries based on Django
2228

docs/community/security-policy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ This project doesn’t have formal support targets for non-latest versions. Back
88

99
### Reporting a vulnerability
1010

11-
To report a vulnerability, please contact any one of the named authors in the package’s [pyproject.toml](https://github.com/torchbox/django-pattern-library/blob/main/pyproject.toml).
11+
To report a vulnerability, please contact any one of the [maintainers listed on PyPI](https://pypi.org/project/django-pattern-library/).

0 commit comments

Comments
 (0)