pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/www/py-wagtail



Module Name:    pkgsrc
Committed By:   joerg
Date:           Thu Aug 20 12:58:35 UTC 2020

Modified Files:
        pkgsrc/www/py-wagtail: Makefile distinfo
Added Files:
        pkgsrc/www/py-wagtail/patches: patch-wagtail_documents_forms.py
            patch-wagtail_documents_views_multiple.py

Log Message:
Explicitly depend on django-filter. Merge a pull request to fix a big
for custom document models. Bump revision.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/www/py-wagtail/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/www/py-wagtail/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/www/py-wagtail/patches/patch-wagtail_documents_forms.py \
    pkgsrc/www/py-wagtail/patches/patch-wagtail_documents_views_multiple.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/www/py-wagtail/Makefile
diff -u pkgsrc/www/py-wagtail/Makefile:1.4 pkgsrc/www/py-wagtail/Makefile:1.5
--- pkgsrc/www/py-wagtail/Makefile:1.4  Tue Aug 18 01:16:13 2020
+++ pkgsrc/www/py-wagtail/Makefile      Thu Aug 20 12:58:35 2020
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.4 2020/08/18 01:16:13 joerg Exp $
+# $NetBSD: Makefile,v 1.5 2020/08/20 12:58:35 joerg Exp $
 
 DISTNAME=      wagtail-2.10
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
+PKGREVISION=   1
 CATEGORIES=    www python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=w/wagtail/}
 
@@ -11,6 +12,7 @@ COMMENT=      Django-based Content Management
 LICENSE=       modified-bsd
 
 DEPENDS+=      ${PYPKGPREFIX}-django>=2<3.1:../../www/py-django2
+DEPENDS+=      ${PYPKGPREFIX}-django-filter>=2.2.0:../../www/py-django-filter
 DEPENDS+=      ${PYPKGPREFIX}-django-modelcluster>=5.0<6.0:../../www/py-django-modelcluster
 DEPENDS+=      ${PYPKGPREFIX}-django-taggit>=1.0<2.0:../../www/py-django-taggit
 DEPENDS+=      ${PYPKGPREFIX}-django-treebeard>=4.2<5.0:../../www/py-django-treebeard
@@ -38,6 +40,9 @@ PYTHON_VERSIONS_INCOMPATIBLE= 27      # py-dj
 
 REPLACE_PYTHON+=       wagtail/project_template/manage.py
 
+pre-install:
+       ${FIND} ${WRKSRC} -name '*.orig' -delete
+
 do-test:
        cd ${WRKSRC} && ${PREFIX}/bin/coverage-${PYVERSSUFFIX} run -m django test --settings=wagtail.tests.settings
 

Index: pkgsrc/www/py-wagtail/distinfo
diff -u pkgsrc/www/py-wagtail/distinfo:1.2 pkgsrc/www/py-wagtail/distinfo:1.3
--- pkgsrc/www/py-wagtail/distinfo:1.2  Tue Aug 18 01:16:13 2020
+++ pkgsrc/www/py-wagtail/distinfo      Thu Aug 20 12:58:35 2020
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.2 2020/08/18 01:16:13 joerg Exp $
+$NetBSD: distinfo,v 1.3 2020/08/20 12:58:35 joerg Exp $
 
 SHA1 (wagtail-2.10.tar.gz) = fe4d9a9d9d852ff7544bb931509e0bb03c0431ef
 RMD160 (wagtail-2.10.tar.gz) = 5e1505d6b5ee2bd4690c9692be7db8b740291064
 SHA512 (wagtail-2.10.tar.gz) = e90beb0372a11c1d9666d860c17d0599300df740bb49712c8eb9b2e46aa69998cbdc2cd6ab6a2faba6bc20d1266da6313aac019808284ad3994efaef93a3f386
 Size (wagtail-2.10.tar.gz) = 8706446 bytes
 SHA1 (patch-setup.py) = ead66cd931d462e6ea94c37da5b8200beffc5cb2
+SHA1 (patch-wagtail_documents_forms.py) = de884d59913addcbb2f20a9c6264fe2a6bc29ae6
+SHA1 (patch-wagtail_documents_views_multiple.py) = 2fd96cf16ee5728b452e40e658d165c72e901824

Added files:

Index: pkgsrc/www/py-wagtail/patches/patch-wagtail_documents_forms.py
diff -u /dev/null pkgsrc/www/py-wagtail/patches/patch-wagtail_documents_forms.py:1.1
--- /dev/null   Thu Aug 20 12:58:35 2020
+++ pkgsrc/www/py-wagtail/patches/patch-wagtail_documents_forms.py      Thu Aug 20 12:58:35 2020
@@ -0,0 +1,26 @@
+$NetBSD: patch-wagtail_documents_forms.py,v 1.1 2020/08/20 12:58:35 joerg Exp $
+
+#6337
+
+--- wagtail/documents/forms.py.orig    2020-08-18 20:47:57.396518448 +0000
++++ wagtail/documents/forms.py
+@@ -32,6 +32,19 @@ def get_document_form(model):
+         })
+ 
+ 
++def get_document_upload_form(model):
++    fields = ('title', 'collection', 'file')
++
++    return modelform_factory(
++        model,
++        form=BaseDocumentForm,
++        fields=fields,
++        widgets={
++            'tags': widgets.AdminTagWidget,
++            'file': forms.FileInput()
++        })
++
++
+ def get_document_multi_form(model):
+     fields = [field for field in model.admin_form_fields if field != 'file']
+     if 'collection' not in fields:
Index: pkgsrc/www/py-wagtail/patches/patch-wagtail_documents_views_multiple.py
diff -u /dev/null pkgsrc/www/py-wagtail/patches/patch-wagtail_documents_views_multiple.py:1.1
--- /dev/null   Thu Aug 20 12:58:35 2020
+++ pkgsrc/www/py-wagtail/patches/patch-wagtail_documents_views_multiple.py     Thu Aug 20 12:58:35 2020
@@ -0,0 +1,32 @@
+$NetBSD: patch-wagtail_documents_views_multiple.py,v 1.1 2020/08/20 12:58:35 joerg Exp $
+
+#6337
+
+--- wagtail/documents/views/multiple.py.orig   2020-08-11 09:43:49.000000000 +0000
++++ wagtail/documents/views/multiple.py
+@@ -12,7 +12,7 @@ from wagtail.core.models import Collecti
+ from wagtail.search.backends import get_search_backends
+ 
+ from .. import get_document_model
+-from ..forms import get_document_form, get_document_multi_form
++from ..forms import get_document_form, get_document_upload_form, get_document_multi_form
+ from ..permissions import permission_policy
+ 
+ permission_checker = PermissionPolicyChecker(permission_policy)
+@@ -23,6 +23,7 @@ permission_checker = PermissionPolicyChe
+ def add(request):
+     Document = get_document_model()
+     DocumentForm = get_document_form(Document)
++    DocumentUploadForm = get_document_upload_form(Document)
+     DocumentMultiForm = get_document_multi_form(Document)
+ 
+     collections = permission_policy.collections_user_has_permission_for(request.user, 'add')
+@@ -40,7 +41,7 @@ def add(request):
+             return HttpResponseBadRequest("Must upload a file")
+ 
+         # Build a form for validation
+-        form = DocumentForm({
++        form = DocumentUploadForm({
+             'title': request.FILES['files[]'].name,
+             'collection': request.POST.get('collection'),
+         }, {



Home | Main Index | Thread Index | Old Index