git: db1f7321ddd8 - main - net-mgmt/netbox: Create Django 5.1 consumers

From: Kai Knoblich <kai_at_FreeBSD.org>
Date: Sat, 08 Feb 2025 09:55:01 UTC
The branch main has been updated by kai:

URL: https://cgit.FreeBSD.org/ports/commit/?id=db1f7321ddd8fee00e35d371b4a9e144b670a248

commit db1f7321ddd8fee00e35d371b4a9e144b670a248
Author:     Kai Knoblich <kai@FreeBSD.org>
AuthorDate: 2025-02-08 09:10:06 +0000
Commit:     Kai Knoblich <kai@FreeBSD.org>
CommitDate: 2025-02-08 09:51:47 +0000

    net-mgmt/netbox: Create Django 5.1 consumers
    
    * Django 4.2 is currently the "default" version in the ports tree due
      its long term support until April 2026.  Thus ports that are assigned
      to that version will exist until then.
    
      The following ports are required to make the upgrade of
      net-mgmt/netbox to the 4.2 release possible because it requires
      Django 5.1.
    
      All of the ports listed below were created on the basis of their
      respective original ports:
    
      - devel/py-dj51-django-rq
      - devel/py-dj51-strawberry-graphql
      - www/py-dj51-channels
      - www/py-dj51-django-auth-ldap
      - www/py-dj51-django-choices-field
      - www/py-dj51-django-cors-headers
      - www/py-dj51-django-debug-toolbar
      - www/py-dj51-django-filter
      - www/py-dj51-django-htmx
      - www/py-dj51-django-js-asset
      - www/py-dj51-django-mptt
      - www/py-dj51-django-prometheus
      - www/py-dj51-django-redis
      - www/py-dj51-django-rich
      - www/py-dj51-django-tables2
      - www/py-dj51-django-taggit
      - www/py-dj51-django-timezone-field
      - www/py-dj51-djangorestframework
      - www/py-dj51-drf-spectacular
      - www/py-dj51-drf-spectacular-sidecar
      - www/py-dj51-strawberry-graphql-django
    
      Assign the following ports to its maintainer who already
      maintain the Django 4.2 variants of them [1]:
    
      - devel/py-dj51-django-rq
      - www/py-dj51-channels
      - www/py-dj51-django-debug-toolbar
      - www/py-dj51-django-redis
    
    Approved by:    sunpoet (implicit) [1]
---
 devel/Makefile                                     |  2 +
 devel/py-dj51-django-rq/Makefile                   | 41 ++++++++++++
 devel/py-dj51-django-rq/distinfo                   |  3 +
 devel/py-dj51-django-rq/pkg-descr                  |  3 +
 devel/py-dj51-strawberry-graphql/Makefile          | 73 ++++++++++++++++++++++
 devel/py-dj51-strawberry-graphql/distinfo          |  3 +
 devel/py-dj51-strawberry-graphql/pkg-descr         | 23 +++++++
 www/Makefile                                       | 19 ++++++
 www/py-dj51-channels/Makefile                      | 27 ++++++++
 www/py-dj51-channels/distinfo                      |  3 +
 www/py-dj51-channels/pkg-descr                     |  4 ++
 www/py-dj51-django-auth-ldap/Makefile              | 40 ++++++++++++
 www/py-dj51-django-auth-ldap/distinfo              |  3 +
 .../files/patch-docs_conf.py                       | 20 ++++++
 www/py-dj51-django-auth-ldap/pkg-descr             |  4 ++
 www/py-dj51-django-choices-field/Makefile          | 26 ++++++++
 www/py-dj51-django-choices-field/distinfo          |  3 +
 www/py-dj51-django-choices-field/pkg-descr         |  2 +
 www/py-dj51-django-cors-headers/Makefile           | 27 ++++++++
 www/py-dj51-django-cors-headers/distinfo           |  3 +
 www/py-dj51-django-cors-headers/pkg-descr          |  2 +
 www/py-dj51-django-debug-toolbar/Makefile          | 26 ++++++++
 www/py-dj51-django-debug-toolbar/distinfo          |  3 +
 www/py-dj51-django-debug-toolbar/pkg-descr         |  3 +
 www/py-dj51-django-filter/Makefile                 | 25 ++++++++
 www/py-dj51-django-filter/distinfo                 |  3 +
 www/py-dj51-django-filter/pkg-descr                |  2 +
 www/py-dj51-django-htmx/Makefile                   | 27 ++++++++
 www/py-dj51-django-htmx/distinfo                   |  3 +
 www/py-dj51-django-htmx/pkg-descr                  |  3 +
 www/py-dj51-django-js-asset/Makefile               | 25 ++++++++
 www/py-dj51-django-js-asset/distinfo               |  3 +
 www/py-dj51-django-js-asset/pkg-descr              |  2 +
 www/py-dj51-django-mptt/Makefile                   | 26 ++++++++
 www/py-dj51-django-mptt/distinfo                   |  3 +
 www/py-dj51-django-mptt/pkg-descr                  |  2 +
 www/py-dj51-django-prometheus/Makefile             | 38 +++++++++++
 www/py-dj51-django-prometheus/distinfo             |  3 +
 .../files/patch-pyproject.toml                     | 11 ++++
 www/py-dj51-django-prometheus/files/patch-setup.py | 13 ++++
 www/py-dj51-django-prometheus/pkg-descr            | 14 +++++
 www/py-dj51-django-redis/Makefile                  | 33 ++++++++++
 www/py-dj51-django-redis/distinfo                  |  3 +
 www/py-dj51-django-redis/pkg-descr                 | 15 +++++
 www/py-dj51-django-rich/Makefile                   | 27 ++++++++
 www/py-dj51-django-rich/distinfo                   |  3 +
 www/py-dj51-django-rich/pkg-descr                  | 11 ++++
 www/py-dj51-django-tables2/Makefile                | 30 +++++++++
 www/py-dj51-django-tables2/distinfo                |  3 +
 www/py-dj51-django-tables2/pkg-descr               |  3 +
 www/py-dj51-django-taggit/Makefile                 | 28 +++++++++
 www/py-dj51-django-taggit/distinfo                 |  3 +
 www/py-dj51-django-taggit/pkg-descr                |  1 +
 www/py-dj51-django-timezone-field/Makefile         | 25 ++++++++
 www/py-dj51-django-timezone-field/distinfo         |  3 +
 www/py-dj51-django-timezone-field/pkg-descr        |  2 +
 www/py-dj51-djangorestframework/Makefile           | 23 +++++++
 www/py-dj51-djangorestframework/distinfo           |  3 +
 www/py-dj51-djangorestframework/pkg-descr          |  2 +
 www/py-dj51-drf-spectacular-sidecar/Makefile       | 24 +++++++
 www/py-dj51-drf-spectacular-sidecar/distinfo       |  3 +
 www/py-dj51-drf-spectacular-sidecar/pkg-descr      |  5 ++
 www/py-dj51-drf-spectacular/Makefile               | 35 +++++++++++
 www/py-dj51-drf-spectacular/distinfo               |  3 +
 www/py-dj51-drf-spectacular/pkg-descr              | 24 +++++++
 www/py-dj51-strawberry-graphql-django/Makefile     | 37 +++++++++++
 www/py-dj51-strawberry-graphql-django/distinfo     |  3 +
 www/py-dj51-strawberry-graphql-django/pkg-descr    | 15 +++++
 68 files changed, 933 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 137cd6190b68..ccc7b48629a6 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4796,6 +4796,8 @@
     SUBDIR += py-distributed
     SUBDIR += py-dj50-django-rq
     SUBDIR += py-dj50-strawberry-graphql
+    SUBDIR += py-dj51-django-rq
+    SUBDIR += py-dj51-strawberry-graphql
     SUBDIR += py-django-rq
     SUBDIR += py-dm-tree
     SUBDIR += py-docformatter
diff --git a/devel/py-dj51-django-rq/Makefile b/devel/py-dj51-django-rq/Makefile
new file mode 100644
index 000000000000..8ce3e7989a0c
--- /dev/null
+++ b/devel/py-dj51-django-rq/Makefile
@@ -0,0 +1,41 @@
+PORTNAME=	django-rq
+PORTVERSION=	3.0.0
+CATEGORIES=	devel python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}dj51-
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Provides Django integration for RQ (Redis Queue)
+WWW=		https://github.com/rq/django-rq
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE.txt
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}django51>=3.2:www/py-django51@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}redis>=3.5:databases/py-redis@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}rq>=2:devel/py-rq@${PY_FLAVOR}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}dj51-django-redis>0:www/py-dj51-django-redis@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pyyaml>=0:devel/py-pyyaml@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}rq-scheduler>=0:devel/py-rq-scheduler@${PY_FLAVOR} \
+		redis-server:databases/redis
+
+USES=		python:3.10+
+USE_PYTHON=	autoplist concurrent distutils
+
+TEST_ENV=	PYTHONPATH="."
+
+CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}*${PORTNAME}
+
+NO_ARCH=	yes
+
+OPTIONS_DEFINE=	SENTRY
+
+SENTRY_DESC=	Sentry support
+
+SENTRY_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sentry-sdk>=1.0.0:devel/py-sentry-sdk@${PY_FLAVOR}
+
+# https://github.com/rq/django-rq/blob/master/Makefile
+do-test:
+	cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${LOCALBASE}/bin/django-admin test django_rq --settings=django_rq.tests.settings -v2
+
+.include <bsd.port.mk>
diff --git a/devel/py-dj51-django-rq/distinfo b/devel/py-dj51-django-rq/distinfo
new file mode 100644
index 000000000000..cfd9a078c46b
--- /dev/null
+++ b/devel/py-dj51-django-rq/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1730574573
+SHA256 (django-rq-3.0.0.tar.gz) = 7bdadb85d9909c118cf1ee1b9bdd1a74ebf141bf8f3c2de2409fcac6080f67ac
+SIZE (django-rq-3.0.0.tar.gz) = 53356
diff --git a/devel/py-dj51-django-rq/pkg-descr b/devel/py-dj51-django-rq/pkg-descr
new file mode 100644
index 000000000000..85e24c643a23
--- /dev/null
+++ b/devel/py-dj51-django-rq/pkg-descr
@@ -0,0 +1,3 @@
+Django integration with RQ, a Redis based Python queuing library. Django-RQ is a
+simple app that allows you to configure your queues in django's settings.py and
+easily use them in your project.
diff --git a/devel/py-dj51-strawberry-graphql/Makefile b/devel/py-dj51-strawberry-graphql/Makefile
new file mode 100644
index 000000000000..e0bc26fd7be1
--- /dev/null
+++ b/devel/py-dj51-strawberry-graphql/Makefile
@@ -0,0 +1,73 @@
+PORTNAME=	strawberry-graphql
+DISTVERSION=	0.258.0
+CATEGORIES=	devel python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}dj51-
+DISTNAME=	strawberry_graphql-${DISTVERSION}
+
+MAINTAINER=	kai@FreeBSD.org
+COMMENT=	Library for creating GraphQL APIs
+WWW=		https://github.com/strawberry-graphql/strawberry
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}poetry-core>=1.6:devel/py-poetry-core@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}python-dateutil>=2.7.0:devel/py-python-dateutil@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}graphql-core>=3.2.0<3.4.0:devel/py-graphql-core@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.5.0:devel/py-typing-extensions@${PY_FLAVOR}
+
+USES=		python:3.10+
+USE_PYTHON=	autoplist concurrent pep517
+
+CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}*${PORTNAME}
+
+NO_ARCH=	yes
+
+OPTIONS_DEFINE=		AIOHTTP ASGI CHANNELS CLI DEBUG DEBUG-SERVER DJANGO \
+			FASTAPI FLASK OPENTELEMETRY PYDANTIC
+
+AIOHTTP_DESC=		Basic AIOHTTP integration
+ASGI_DESC=		Basic ASGI integration
+CHANNELS_DESC=		Support for Django Channels
+CLI_DESC=		Support for CLI commands
+DEBUG-SERVER_DESC=	Enable debug server
+DEBUG_DESC=		Generate verbose debug information
+DJANGO_DESC=		Basic Django integration
+FASTAPI_DESC=		Support for FastAPI in conjunction with GraphQLRouter
+FLASK_DESC=		Basic Flask integration
+OPENTELEMETRY_DESC=	Generate Open Telemetry compatible tracing information
+PYDANTIC_DESC=		Support for Pydantic models
+
+AIOHTTP_RUN_DEPENDS=		${PYTHON_PKGNAMEPREFIX}aiohttp>=3.7.4:www/py-aiohttp@${PY_FLAVOR}
+ASGI_RUN_DEPENDS=		${PYTHON_PKGNAMEPREFIX}multipart>=0.0.7:devel/py-multipart@${PY_FLAVOR} \
+				${PYTHON_PKGNAMEPREFIX}starlette>=0.18.0:www/py-starlette@${PY_FLAVOR}
+CHANNELS_RUN_DEPENDS=		${PYTHON_PKGNAMEPREFIX}asgiref>=3.2:www/py-asgiref@${PY_FLAVOR} \
+				${PYTHON_PKGNAMEPREFIX}dj51-channels>=3.0.5:www/py-dj51-channels@${PY_FLAVOR}
+CLI_RUN_DEPENDS=		${PYTHON_PKGNAMEPREFIX}libcst>=1.0.0:devel/py-libcst@${PY_FLAVOR} \
+				${PYTHON_PKGNAMEPREFIX}pygments>=2.3:textproc/py-pygments@${PY_FLAVOR} \
+				${PYTHON_PKGNAMEPREFIX}rich>=12.0.0:textproc/py-rich@${PY_FLAVOR} \
+				${PYTHON_PKGNAMEPREFIX}typer>=0.7.0:devel/py-typer@${PY_FLAVOR}
+DEBUG-SERVER_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}libcst>=1.0.0:devel/py-libcst@${PY_FLAVOR} \
+				${PYTHON_PKGNAMEPREFIX}multipart>=0.0.7:devel/py-multipart@${PY_FLAVOR} \
+				${PYTHON_PKGNAMEPREFIX}pygments>=2.3:textproc/py-pygments@${PY_FLAVOR} \
+				${PYTHON_PKGNAMEPREFIX}rich>=12.0.0:textproc/py-rich@${PY_FLAVOR} \
+				${PYTHON_PKGNAMEPREFIX}starlette>=0.18.0:www/py-starlette@${PY_FLAVOR} \
+				${PYTHON_PKGNAMEPREFIX}typer>=0.7.0:devel/py-typer@${PY_FLAVOR} \
+				${PYTHON_PKGNAMEPREFIX}uvicorn>=0.11.6:www/py-uvicorn@${PY_FLAVOR}
+DEBUG_RUN_DEPENDS=		${PYTHON_PKGNAMEPREFIX}libcst>=1.0.0:devel/py-libcst@${PY_FLAVOR} \
+				${PYTHON_PKGNAMEPREFIX}rich>=12.0.0:textproc/py-rich@${PY_FLAVOR}
+# NB: www/py-channels (via CHANNELS) options depends on www/py-djangoXX, which
+# should be taken into account when creating a port for a specific Django version.
+DJANGO_RUN_DEPENDS=		${PYTHON_PKGNAMEPREFIX}asgiref>=3.2:www/py-asgiref@${PY_FLAVOR} \
+				${PYTHON_PKGNAMEPREFIX}django51>=3.2:www/py-django51@${PY_FLAVOR} \
+				${PYTHON_PKGNAMEPREFIX}pytest-django>0:devel/py-pytest-django@${PY_FLAVOR}
+FASTAPI_RUN_DEPENDS=		${PYTHON_PKGNAMEPREFIX}fastapi>=0.62.5:www/py-fastapi@${PY_FLAVOR} \
+				${PYTHON_PKGNAMEPREFIX}multipart>=0.0.7:devel/py-multipart@${PY_FLAVOR}
+FLASK_RUN_DEPENDS=		${PYTHON_PKGNAMEPREFIX}flask>=1.1:www/py-flask@${PY_FLAVOR}
+OPENTELEMETRY_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}opentelemetry-api<2:devel/py-opentelemetry-api@${PY_FLAVOR} \
+				${PYTHON_PKGNAMEPREFIX}opentelemetry-sdk<2:devel/py-opentelemetry-sdk@${PY_FLAVOR}
+# NB: Switch to devel/py-pydantic once www/py-fastapi uses it
+PYDANTIC_RUN_DEPENDS=		${PYTHON_PKGNAMEPREFIX}pydantic2>1.6.1:devel/py-pydantic2@${PY_FLAVOR}
+
+.include <bsd.port.mk>
diff --git a/devel/py-dj51-strawberry-graphql/distinfo b/devel/py-dj51-strawberry-graphql/distinfo
new file mode 100644
index 000000000000..b340a416f11f
--- /dev/null
+++ b/devel/py-dj51-strawberry-graphql/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1737194612
+SHA256 (strawberry_graphql-0.258.0.tar.gz) = 3975c638f751e9b87cefd5eb1a29c1f33e639b1f218f199578114fb839dec94c
+SIZE (strawberry_graphql-0.258.0.tar.gz) = 202375
diff --git a/devel/py-dj51-strawberry-graphql/pkg-descr b/devel/py-dj51-strawberry-graphql/pkg-descr
new file mode 100644
index 000000000000..ea25df49f06d
--- /dev/null
+++ b/devel/py-dj51-strawberry-graphql/pkg-descr
@@ -0,0 +1,23 @@
+Strawberry is a developer friendly GraphQL library for Python, designed for
+modern development.
+
+* Type hints: Leverages Python type hints to provide a great developer
+  experience while creating GraphQL Libraries.
+
+* Async Support: Supports async/await out of the box, allowing you to write
+  your resolvers in a non-blocking way.
+
+* Extensible: Has support for schema and field extensions, allowing you to
+  extend the schema with custom logic.
+
+* Generics: Supports generics, allowing you to create reusable types that can
+  be used in multiple places.
+
+* Federation: Supports Federation, allowing you to create a federated GraphQL
+  schema.
+
+* Dataloaders: Comes with support for dataloaders, allowing you to batch
+  multiple queries into a single one.
+
+* Integrations: Has support for multiple integrations, allowing you to use it
+  with your favorite web framework.
diff --git a/www/Makefile b/www/Makefile
index 77125dd08523..c2bd8ac7c6e7 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -1527,6 +1527,25 @@
     SUBDIR += py-dj50-drf-spectacular
     SUBDIR += py-dj50-drf-spectacular-sidecar
     SUBDIR += py-dj50-strawberry-graphql-django
+    SUBDIR += py-dj51-channels
+    SUBDIR += py-dj51-django-auth-ldap
+    SUBDIR += py-dj51-django-choices-field
+    SUBDIR += py-dj51-django-cors-headers
+    SUBDIR += py-dj51-django-debug-toolbar
+    SUBDIR += py-dj51-django-filter
+    SUBDIR += py-dj51-django-htmx
+    SUBDIR += py-dj51-django-js-asset
+    SUBDIR += py-dj51-django-mptt
+    SUBDIR += py-dj51-django-prometheus
+    SUBDIR += py-dj51-django-redis
+    SUBDIR += py-dj51-django-rich
+    SUBDIR += py-dj51-django-tables2
+    SUBDIR += py-dj51-django-taggit
+    SUBDIR += py-dj51-django-timezone-field
+    SUBDIR += py-dj51-djangorestframework
+    SUBDIR += py-dj51-drf-spectacular
+    SUBDIR += py-dj51-drf-spectacular-sidecar
+    SUBDIR += py-dj51-strawberry-graphql-django
     SUBDIR += py-django-admin-rangefilter
     SUBDIR += py-django-advanced-filters
     SUBDIR += py-django-allauth
diff --git a/www/py-dj51-channels/Makefile b/www/py-dj51-channels/Makefile
new file mode 100644
index 000000000000..28e375797b52
--- /dev/null
+++ b/www/py-dj51-channels/Makefile
@@ -0,0 +1,27 @@
+PORTNAME=	channels
+PORTVERSION=	4.2.0
+CATEGORIES=	www python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}dj51-
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Brings async, event-driven capabilities to Django
+WWW=		https://channels.readthedocs.io/en/latest/ \
+		https://github.com/django/channels
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}asgiref>=3.6.0<4:www/py-asgiref@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}django51>=4.2:www/py-django51@${PY_FLAVOR}
+
+USES=		python:3.10+
+USE_PYTHON=	autoplist concurrent pep517
+
+CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}*${PORTNAME}
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/www/py-dj51-channels/distinfo b/www/py-dj51-channels/distinfo
new file mode 100644
index 000000000000..cfa8d2a5103d
--- /dev/null
+++ b/www/py-dj51-channels/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1732202562
+SHA256 (channels-4.2.0.tar.gz) = d9e707487431ba5dbce9af982970dab3b0efd786580fadb99e45dca5e39fdd59
+SIZE (channels-4.2.0.tar.gz) = 26554
diff --git a/www/py-dj51-channels/pkg-descr b/www/py-dj51-channels/pkg-descr
new file mode 100644
index 000000000000..01296180bc27
--- /dev/null
+++ b/www/py-dj51-channels/pkg-descr
@@ -0,0 +1,4 @@
+Channels augments Django to bring WebSocket, long-poll HTTP, task offloading and
+other async support to your code, using familiar Django design patterns and a
+flexible underlying framework that lets you not only customize behaviours but
+also write support for your own protocols and needs.
diff --git a/www/py-dj51-django-auth-ldap/Makefile b/www/py-dj51-django-auth-ldap/Makefile
new file mode 100644
index 000000000000..94a842eefd8b
--- /dev/null
+++ b/www/py-dj51-django-auth-ldap/Makefile
@@ -0,0 +1,40 @@
+PORTNAME=	django-auth-ldap
+PORTVERSION=	5.1.0
+CATEGORIES=	www security python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}dj51-
+DISTNAME=	django_auth_ldap-${PORTVERSION}
+
+MAINTAINER=	kai@FreeBSD.org
+COMMENT=	LDAP integration for django.contrib.auth
+WWW=		https://github.com/django-auth-ldap/django-auth-ldap
+
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PY_SETUPTOOLS} \
+		${PYTHON_PKGNAMEPREFIX}setuptools-scm>=3.4:devel/py-setuptools-scm@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}django51>=4.2:www/py-django51@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}python-ldap>=3.1:net/py-python-ldap@${PY_FLAVOR}
+
+USES=		python:3.10+
+USE_PYTHON=	autoplist concurrent pep517
+
+CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}*${PORTNAME}
+
+NO_ARCH=	yes
+PORTDOCS=	*
+OPTIONS_DEFINE=	DOCS
+DOCS_BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sphinx>=0,1:textproc/py-sphinx@${PY_FLAVOR}
+
+post-build-DOCS-on:
+	${LOCALBASE}/bin/sphinx-build-${PYTHON_VER} -d ${WRKDIR} -b html ${WRKSRC}/docs ${WRKSRC}/build/sphinx/html
+
+post-install-DOCS-on:
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	(cd ${WRKSRC}/build/sphinx/html && \
+		${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} \
+			"! -name .buildinfo -and ! -name objects.inv")
+
+.include <bsd.port.mk>
diff --git a/www/py-dj51-django-auth-ldap/distinfo b/www/py-dj51-django-auth-ldap/distinfo
new file mode 100644
index 000000000000..2ae0a3f4baa0
--- /dev/null
+++ b/www/py-dj51-django-auth-ldap/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1730477310
+SHA256 (django_auth_ldap-5.1.0.tar.gz) = 9c607e8d9c53cf2a0ccafbe0acfc33eb1d1fd474c46ec52d30aee0dca1da9668
+SIZE (django_auth_ldap-5.1.0.tar.gz) = 55059
diff --git a/www/py-dj51-django-auth-ldap/files/patch-docs_conf.py b/www/py-dj51-django-auth-ldap/files/patch-docs_conf.py
new file mode 100644
index 000000000000..d41916245ebc
--- /dev/null
+++ b/www/py-dj51-django-auth-ldap/files/patch-docs_conf.py
@@ -0,0 +1,20 @@
+Avoid the download of various intersphinx inventories during build.  Only two
+intersphinx mappings are used and the documentation can be built/used without
+them.
+
+--- docs/conf.py.orig	2022-06-12 10:26:47 UTC
++++ docs/conf.py
+@@ -188,13 +188,3 @@ texinfo_documents = [
+ # -- Extension configuration -------------------------------------------------
+ 
+ # -- Options for intersphinx extension ---------------------------------------
+-
+-intersphinx_mapping = {
+-    "python": ("https://docs.python.org/3/", None),
+-    "django": (
+-        "https://docs.djangoproject.com/en/stable/",
+-        "https://docs.djangoproject.com/en/stable/_objects/",
+-    ),
+-    "pythonldap": ("https://www.python-ldap.org/en/latest/", None),
+-    "tox": ("https://tox.wiki/en/latest/", None),
+-}
diff --git a/www/py-dj51-django-auth-ldap/pkg-descr b/www/py-dj51-django-auth-ldap/pkg-descr
new file mode 100644
index 000000000000..390903dba8ac
--- /dev/null
+++ b/www/py-dj51-django-auth-ldap/pkg-descr
@@ -0,0 +1,4 @@
+This is a Django authentication backend that authenticates against an LDAP
+service. Configuration can be as simple as a single distinguished name template,
+but there are many rich configuration options for working with users, groups,
+and permissions.
diff --git a/www/py-dj51-django-choices-field/Makefile b/www/py-dj51-django-choices-field/Makefile
new file mode 100644
index 000000000000..c0090e2af7de
--- /dev/null
+++ b/www/py-dj51-django-choices-field/Makefile
@@ -0,0 +1,26 @@
+PORTNAME=	django-choices-field
+DISTVERSION=	2.3.0
+CATEGORIES=	www python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}dj51-
+DISTNAME=	django_choices_field-${DISTVERSION}
+
+MAINTAINER=	kai@FreeBSD.org
+COMMENT=	Django field that set/get TextChoices/IntegerChoices enumerations
+WWW=		https://github.com/bellini666/django-choices-field
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}poetry-core>=1.0.0:devel/py-poetry-core@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}django51>=3.2:www/py-django51@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.0.0:devel/py-typing-extensions@${PY_FLAVOR}
+
+USES=		python:3.10+
+USE_PYTHON=	autoplist pep517
+
+CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}*${PORTNAME}
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/www/py-dj51-django-choices-field/distinfo b/www/py-dj51-django-choices-field/distinfo
new file mode 100644
index 000000000000..7f61f9ac7dde
--- /dev/null
+++ b/www/py-dj51-django-choices-field/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1711885476
+SHA256 (django_choices_field-2.3.0.tar.gz) = bb0c85c79737ab98bfb9c0d9ddf98010d612c0585be767890e25fd192c3d1694
+SIZE (django_choices_field-2.3.0.tar.gz) = 6448
diff --git a/www/py-dj51-django-choices-field/pkg-descr b/www/py-dj51-django-choices-field/pkg-descr
new file mode 100644
index 000000000000..3a855539fca9
--- /dev/null
+++ b/www/py-dj51-django-choices-field/pkg-descr
@@ -0,0 +1,2 @@
+This package provides a Django field that set/get the "TextChoices" and
+"IntegerChoices" enumerations.
diff --git a/www/py-dj51-django-cors-headers/Makefile b/www/py-dj51-django-cors-headers/Makefile
new file mode 100644
index 000000000000..12f99ed535a0
--- /dev/null
+++ b/www/py-dj51-django-cors-headers/Makefile
@@ -0,0 +1,27 @@
+PORTNAME=	django-cors-headers
+PORTVERSION=	4.6.0
+CATEGORIES=	www python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}dj51-
+DISTNAME=	django_cors_headers-${PORTVERSION}
+
+MAINTAINER=	kai@FreeBSD.org
+COMMENT=	Handles server headers required for Cross-Origin Resource Sharing
+WWW=		https://github.com/adamchainz/django-cors-headers
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PY_SETUPTOOLS} \
+		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}django51>=4.2:www/py-django51@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}asgiref>=3.6:www/py-asgiref@${PY_FLAVOR}
+
+USES=		python:3.10+
+USE_PYTHON=	autoplist pep517
+
+CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}*${PORTNAME}
+
+NO_ARCH=		yes
+
+.include <bsd.port.mk>
diff --git a/www/py-dj51-django-cors-headers/distinfo b/www/py-dj51-django-cors-headers/distinfo
new file mode 100644
index 000000000000..8085505c3c98
--- /dev/null
+++ b/www/py-dj51-django-cors-headers/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1730458015
+SHA256 (django_cors_headers-4.6.0.tar.gz) = 14d76b4b4c8d39375baeddd89e4f08899051eeaf177cb02a29bd6eae8cf63aa8
+SIZE (django_cors_headers-4.6.0.tar.gz) = 20961
diff --git a/www/py-dj51-django-cors-headers/pkg-descr b/www/py-dj51-django-cors-headers/pkg-descr
new file mode 100644
index 000000000000..9ba1bc6bd1a8
--- /dev/null
+++ b/www/py-dj51-django-cors-headers/pkg-descr
@@ -0,0 +1,2 @@
+A Django App that adds CORS (Cross-Origin Resource Sharing) headers to
+responses.
diff --git a/www/py-dj51-django-debug-toolbar/Makefile b/www/py-dj51-django-debug-toolbar/Makefile
new file mode 100644
index 000000000000..85eda13884af
--- /dev/null
+++ b/www/py-dj51-django-debug-toolbar/Makefile
@@ -0,0 +1,26 @@
+PORTNAME=	django-debug-toolbar
+PORTVERSION=	5.0.1
+CATEGORIES=	www python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}dj51-
+DISTNAME=	django_debug_toolbar-${PORTVERSION}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Configurable set of panels to display debug information
+WWW=		https://github.com/django-commons/django-debug-toolbar
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}hatchling>=0:devel/py-hatchling@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}django51>=4.2.9:www/py-django51@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}sqlparse>=0.2.0:databases/py-sqlparse@${PY_FLAVOR}
+
+USES=		python:3.10+
+USE_PYTHON=	autoplist concurrent pep517
+
+CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}*${PORTNAME}
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/www/py-dj51-django-debug-toolbar/distinfo b/www/py-dj51-django-debug-toolbar/distinfo
new file mode 100644
index 000000000000..091508b57214
--- /dev/null
+++ b/www/py-dj51-django-debug-toolbar/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1737194262
+SHA256 (django_debug_toolbar-5.0.1.tar.gz) = 296f6f18a80710e84fbb8361538ae5ec522a75ebe9ab67db34bcf1026cbeb420
+SIZE (django_debug_toolbar-5.0.1.tar.gz) = 295982
diff --git a/www/py-dj51-django-debug-toolbar/pkg-descr b/www/py-dj51-django-debug-toolbar/pkg-descr
new file mode 100644
index 000000000000..e62114e4b61f
--- /dev/null
+++ b/www/py-dj51-django-debug-toolbar/pkg-descr
@@ -0,0 +1,3 @@
+The Django Debug Toolbar is a configurable set of panels that display various
+debug information about the current request/response and when clicked, display
+more details about the panel's content.
diff --git a/www/py-dj51-django-filter/Makefile b/www/py-dj51-django-filter/Makefile
new file mode 100644
index 000000000000..57f659317a0f
--- /dev/null
+++ b/www/py-dj51-django-filter/Makefile
@@ -0,0 +1,25 @@
+PORTNAME=	django-filter
+DISTVERSION=	24.3
+CATEGORIES=	www python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}dj51-
+DISTNAME=	django_filter-${DISTVERSION}
+
+MAINTAINER=	kai@FreeBSD.org
+COMMENT=	Dynamic filtering for querysets with Django
+WWW=		https://github.com/carltongibson/django-filter
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}flit-core>=3.2<4:devel/py-flit-core@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}django51>=4.2:www/py-django51@${PY_FLAVOR}
+
+USES=		python:3.10+
+USE_PYTHON=	autoplist pep517
+
+CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}*${PORTNAME}
+
+NO_ARCH=		yes
+
+.include <bsd.port.mk>
diff --git a/www/py-dj51-django-filter/distinfo b/www/py-dj51-django-filter/distinfo
new file mode 100644
index 000000000000..14f857ea471b
--- /dev/null
+++ b/www/py-dj51-django-filter/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1722954212
+SHA256 (django_filter-24.3.tar.gz) = d8ccaf6732afd21ca0542f6733b11591030fa98669f8d15599b358e24a2cd9c3
+SIZE (django_filter-24.3.tar.gz) = 144444
diff --git a/www/py-dj51-django-filter/pkg-descr b/www/py-dj51-django-filter/pkg-descr
new file mode 100644
index 000000000000..089f799caa3e
--- /dev/null
+++ b/www/py-dj51-django-filter/pkg-descr
@@ -0,0 +1,2 @@
+Django-filter is a reusable Django application allowing users to declaratively
+add dynamic QuerySet filtering from URL parameters.
diff --git a/www/py-dj51-django-htmx/Makefile b/www/py-dj51-django-htmx/Makefile
new file mode 100644
index 000000000000..6ec5bbab13ab
--- /dev/null
+++ b/www/py-dj51-django-htmx/Makefile
@@ -0,0 +1,27 @@
+PORTNAME=	django-htmx
+DISTVERSION=	1.21.0
+CATEGORIES=	www python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}dj51-
+DISTNAME=	django_htmx-${DISTVERSION}
+
+MAINTAINER=	kai@FreeBSD.org
+COMMENT=	Extensions for using Django with htmx
+WWW=		https://github.com/adamchainz/django-htmx
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PY_SETUPTOOLS} \
+		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}django51>=4.2:www/py-django51@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}asgiref>=3.6:www/py-asgiref@${PY_FLAVOR}
+
+USES=		python:3.10+
+USE_PYTHON=	autoplist pep517
+
+CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}*${PORTNAME}
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/www/py-dj51-django-htmx/distinfo b/www/py-dj51-django-htmx/distinfo
new file mode 100644
index 000000000000..b15cd38351e3
--- /dev/null
+++ b/www/py-dj51-django-htmx/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1730458034
+SHA256 (django_htmx-1.21.0.tar.gz) = 6ed3b42effd5980f22e68f36cd14ee4311bff3b6cb8435a89e27f45995691572
+SIZE (django_htmx-1.21.0.tar.gz) = 9611
diff --git a/www/py-dj51-django-htmx/pkg-descr b/www/py-dj51-django-htmx/pkg-descr
new file mode 100644
index 000000000000..9b84019de4a7
--- /dev/null
+++ b/www/py-dj51-django-htmx/pkg-descr
@@ -0,0 +1,3 @@
+This package offers extensions for using Django with htmx, a library that
+allows one to access modern browser features directly from HTML, rather than
+using JavaScript (see https://htmx.org/).
diff --git a/www/py-dj51-django-js-asset/Makefile b/www/py-dj51-django-js-asset/Makefile
new file mode 100644
index 000000000000..7f21c0072445
--- /dev/null
+++ b/www/py-dj51-django-js-asset/Makefile
@@ -0,0 +1,25 @@
+PORTNAME=	django-js-asset
+DISTVERSION=	2.2.0
+CATEGORIES=	www python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}dj51-
+DISTNAME=	django_js_asset-${DISTVERSION}
+
+MAINTAINER=	kai@FreeBSD.org
+COMMENT=	Insert script tags with additional attributes for django.forms.Media
+WWW=		https://github.com/matthiask/django-js-asset
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}hatchling>0:devel/py-hatchling@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}django51>=3.2:www/py-django51@${PY_FLAVOR}
+
+USES=		python:3.10+
+USE_PYTHON=	autoplist pep517
+
+CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}*${PORTNAME}
+
+NO_ARCH=		yes
+
+.include <bsd.port.mk>
diff --git a/www/py-dj51-django-js-asset/distinfo b/www/py-dj51-django-js-asset/distinfo
new file mode 100644
index 000000000000..177df25ec846
--- /dev/null
+++ b/www/py-dj51-django-js-asset/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1702633024
+SHA256 (django_js_asset-2.2.0.tar.gz) = 0c57a82cae2317e83951d956110ce847f58ff0cdc24e314dbc18b35033917e94
+SIZE (django_js_asset-2.2.0.tar.gz) = 7904
diff --git a/www/py-dj51-django-js-asset/pkg-descr b/www/py-dj51-django-js-asset/pkg-descr
new file mode 100644
index 000000000000..99b04e1534c9
--- /dev/null
+++ b/www/py-dj51-django-js-asset/pkg-descr
@@ -0,0 +1,2 @@
+Insert script tags with additional attributes (such as "id" and "data" for
+CSP-compatible data injection) for the django.forms.Media package.
diff --git a/www/py-dj51-django-mptt/Makefile b/www/py-dj51-django-mptt/Makefile
new file mode 100644
index 000000000000..a6305f222f01
--- /dev/null
+++ b/www/py-dj51-django-mptt/Makefile
@@ -0,0 +1,26 @@
+PORTNAME=	django-mptt
+PORTVERSION=	0.16.0
+CATEGORIES=	www python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}dj51-
+DISTNAME=	django_mptt-${PORTVERSION}
+
+MAINTAINER=	kai@FreeBSD.org
+COMMENT=	Utilities for implementing Modified Preorder Tree Traversal in Django
+WWW=		https://github.com/django-mptt/django-mptt
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}hatchling>0:devel/py-hatchling@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}django51>=3.2:www/py-django51@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}dj51-django-js-asset>0:www/py-dj51-django-js-asset@${PY_FLAVOR}
+
+USES=		python:3.10+
+USE_PYTHON=	autoplist pep517
+
+CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}*${PORTNAME}
+
+NO_ARCH=		yes
+
+.include <bsd.port.mk>
diff --git a/www/py-dj51-django-mptt/distinfo b/www/py-dj51-django-mptt/distinfo
new file mode 100644
index 000000000000..736c7dc40fa6
--- /dev/null
+++ b/www/py-dj51-django-mptt/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1712382472
+SHA256 (django_mptt-0.16.0.tar.gz) = 56c9606bf0b329b5f5afd55dd8bfd073612ea1d5999b10903b09de62bee84c8e
+SIZE (django_mptt-0.16.0.tar.gz) = 69886
diff --git a/www/py-dj51-django-mptt/pkg-descr b/www/py-dj51-django-mptt/pkg-descr
new file mode 100644
index 000000000000..bad56cabf151
--- /dev/null
+++ b/www/py-dj51-django-mptt/pkg-descr
@@ -0,0 +1,2 @@
+Utilities for implementing Modified Preorder Tree Traversal with your Django
+Models and working with trees of Model instances.
diff --git a/www/py-dj51-django-prometheus/Makefile b/www/py-dj51-django-prometheus/Makefile
new file mode 100644
index 000000000000..1eca6ed51c49
--- /dev/null
+++ b/www/py-dj51-django-prometheus/Makefile
@@ -0,0 +1,38 @@
+PORTNAME=	django-prometheus
+PORTVERSION=	2.3.1
+CATEGORIES=	www python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}dj51-
+
+MAINTAINER=	kai@FreeBSD.org
+COMMENT=	Export Django monitoring metrics for Prometheus.io
+WWW=		https://github.com/korfuri/django-prometheus
+
+LICENSE=	APACHE20
+
+BUILD_DEPENDS=	${PY_SETUPTOOLS} \
+		${PYTHON_PKGNAMEPREFIX}wheel>=0.40.0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}django51>=3.2:www/py-django51@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}prometheus-client>=0.7:net-mgmt/py-prometheus-client@${PY_FLAVOR}
+
+USES=		python:3.10+
+USE_PYTHON=	autoplist pep517 pytest
+
+TEST_ENV=	PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+
+CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}*${PORTNAME}
+
+NO_ARCH=		yes
+
+OPTIONS_GROUP=		DATABASE CACHE
+OPTIONS_GROUP_CACHE=	MEMCACHED REDIS
+OPTIONS_GROUP_DATABASE=	MYSQL PGSQL
+
+MEMCACHED_DESC=		Memcached distributed memory caching support
+
+MEMCACHED_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}python-memcached>=0:databases/py-python-memcached@${PY_FLAVOR}
+MYSQL_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}mysqlclient>=0:databases/py-mysqlclient@${PY_FLAVOR}
+PGSQL_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}psycopg2>=0:databases/py-psycopg2@${PY_FLAVOR}
+REDIS_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}dj51-django-redis>=4.8:www/py-dj51-django-redis@${PY_FLAVOR}
+
+.include <bsd.port.mk>
diff --git a/www/py-dj51-django-prometheus/distinfo b/www/py-dj51-django-prometheus/distinfo
new file mode 100644
index 000000000000..4f11977cb57e
--- /dev/null
+++ b/www/py-dj51-django-prometheus/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1683262385
+SHA256 (django-prometheus-2.3.1.tar.gz) = f9c8b6c780c9419ea01043c63a437d79db2c33353451347894408184ad9c3e1e
+SIZE (django-prometheus-2.3.1.tar.gz) = 24718
diff --git a/www/py-dj51-django-prometheus/files/patch-pyproject.toml b/www/py-dj51-django-prometheus/files/patch-pyproject.toml
new file mode 100644
index 000000000000..5bf778c4f9e3
--- /dev/null
+++ b/www/py-dj51-django-prometheus/files/patch-pyproject.toml
@@ -0,0 +1,11 @@
+Relax version requirements of py-setuptools.
+
+--- pyproject.toml.orig	2024-10-06 12:58:05 UTC
++++ pyproject.toml
+@@ -1,5 +1,5 @@
+ [build-system]
+-requires = [ "setuptools >= 67.7.2", "wheel >= 0.40.0"]
++requires = [ "setuptools", "wheel >= 0.40.0"]
+ build-backend = "setuptools.build_meta"
+ 
+ [tool.pytest.ini_options]
diff --git a/www/py-dj51-django-prometheus/files/patch-setup.py b/www/py-dj51-django-prometheus/files/patch-setup.py
new file mode 100644
index 000000000000..6e28293ebe58
--- /dev/null
+++ b/www/py-dj51-django-prometheus/files/patch-setup.py
@@ -0,0 +1,13 @@
+Remove py-pytest-runner as build time dependency because it is deprecated and
+should be no longer used.
+
+--- setup.py.orig	2024-10-01 12:41:04 UTC
++++ setup.py
+@@ -40,7 +40,6 @@ setup(
+     long_description=LONG_DESCRIPTION,
+     long_description_content_type="text/markdown",
+     tests_require=["pytest", "pytest-django"],
+-    setup_requires=["pytest-runner"],
+     options={"bdist_wheel": {"universal": "1"}},
+     install_requires=[
+         "prometheus-client>=0.7",
diff --git a/www/py-dj51-django-prometheus/pkg-descr b/www/py-dj51-django-prometheus/pkg-descr
new file mode 100644
index 000000000000..0962e7b87336
--- /dev/null
+++ b/www/py-dj51-django-prometheus/pkg-descr
@@ -0,0 +1,14 @@
+This library exports Django monitoring metrics for Prometheus.io.
+
+It provides support to monitor the following databases types:
+
+* SQLite (via Django)
+* PostgreSQL
+* MySQL
+
+In addition, caches can also be monitored:
+
+* memcached
+* Redis
+
+It's even possible to export metrics of Django models and migrations.
diff --git a/www/py-dj51-django-redis/Makefile b/www/py-dj51-django-redis/Makefile
new file mode 100644
index 000000000000..ad67614d2bd1
--- /dev/null
+++ b/www/py-dj51-django-redis/Makefile
@@ -0,0 +1,33 @@
+PORTNAME=	django-redis
+PORTVERSION=	5.4.0
+CATEGORIES=	www databases python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}dj51-
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Full featured Redis cache/session backend for Django
+WWW=		https://github.com/jazzband/django-redis
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}django51>=3.2:www/py-django51@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}redis>=3:databases/py-redis@${PY_FLAVOR}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}msgpack>=0:devel/py-msgpack@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pytest-django>0:devel/py-pytest-django@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pytest-mock>0:devel/py-pytest-mock@${PY_FLAVOR} \
+		redis-server:databases/redis
+
+USES=		python:3.10+
+USE_PYTHON=	autoplist concurrent distutils pytest
+
+TEST_ENV=	DJANGO_SETTINGS_MODULE=settings.sqlite \
+		PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+
+CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}*${PORTNAME}
+
+NO_ARCH=	yes
+
+TEST_WRKSRC=	${WRKSRC}/tests
+
+.include <bsd.port.mk>
*** 490 LINES SKIPPED ***