Skip to content

Commit

Permalink
www/py-laces: Add py-laces 0.1.1
Browse files Browse the repository at this point in the history
Laces components provide a simple way to combine data (in the form of Python
objects) with the Django templates that are meant to render that data. The
components can then be simply rendered in any other template using the {%
component %} template tag. That parent template does not need to know anything
about the component's template or data. No need to receive, filter, restructure
or pass any data to the component's template. Just let the component render
itself.

Template and data are tied together in the component, and they can be passed
around together. This becomes especially useful when components are nested -- it
allows us to avoid building the same nested structure twice (once in the data
and again in the templates).

Working with objects that know how to render themselves as HTML elements is a
common pattern found in complex Django applications, such as the Wagtail admin
interface. The Wagtail admin is also where the APIs provided in this package
have previously been discovered, developed and solidified. The purpose of this
package is to make these tools available to other Django projects outside the
Wagtail ecosystem.
  • Loading branch information
sunpoet committed Mar 9, 2024
1 parent 8f49288 commit 4f4fc4e
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions www/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1754,6 +1754,7 @@
SUBDIR += py-jonpy
SUBDIR += py-jsonfield
SUBDIR += py-kiss-headers
SUBDIR += py-laces
SUBDIR += py-lektor
SUBDIR += py-lesscpy
SUBDIR += py-libsass
Expand Down
23 changes: 23 additions & 0 deletions www/py-laces/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
PORTNAME= laces
PORTVERSION= 0.1.1
CATEGORIES= www python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}

MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Django components that know how to render themselves
WWW= https://github.com/tbrlpld/laces

LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE

BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django42>=3.2:www/py-django42@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}flit-core>=3.2<4:devel/py-flit-core@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django42>=3.2:www/py-django42@${PY_FLAVOR}

USES= python
USE_PYTHON= autoplist concurrent pep517

NO_ARCH= yes

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions www/py-laces/distinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TIMESTAMP = 1709390340
SHA256 (laces-0.1.1.tar.gz) = e45159c46f6adca33010d34e9af869e57201b70675c6dc088e919b16c89456a4
SIZE (laces-0.1.1.tar.gz) = 26889
19 changes: 19 additions & 0 deletions www/py-laces/pkg-descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Laces components provide a simple way to combine data (in the form of Python
objects) with the Django templates that are meant to render that data. The
components can then be simply rendered in any other template using the {%
component %} template tag. That parent template does not need to know anything
about the component's template or data. No need to receive, filter, restructure
or pass any data to the component's template. Just let the component render
itself.

Template and data are tied together in the component, and they can be passed
around together. This becomes especially useful when components are nested -- it
allows us to avoid building the same nested structure twice (once in the data
and again in the templates).

Working with objects that know how to render themselves as HTML elements is a
common pattern found in complex Django applications, such as the Wagtail admin
interface. The Wagtail admin is also where the APIs provided in this package
have previously been discovered, developed and solidified. The purpose of this
package is to make these tools available to other Django projects outside the
Wagtail ecosystem.

0 comments on commit 4f4fc4e

Please sign in to comment.