www/py-laces: Add py-laces 0.1.1

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.
2024Q2
Po-Chuan Hsieh 2024-03-09 21:44:33 +08:00
parent 8f49288172
commit 4f4fc4eb07
No known key found for this signature in database
GPG Key ID: 9A4BD10F002DD04B
4 changed files with 46 additions and 0 deletions

View File

@ -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

23
www/py-laces/Makefile Normal file
View File

@ -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
www/py-laces/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1709390340
SHA256 (laces-0.1.1.tar.gz) = e45159c46f6adca33010d34e9af869e57201b70675c6dc088e919b16c89456a4
SIZE (laces-0.1.1.tar.gz) = 26889

19
www/py-laces/pkg-descr Normal file
View File

@ -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.