wagtailstreamforms 5.2.6__tar.gz → 5.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/PKG-INFO +66 -11
  2. wagtailstreamforms-5.2.6/wagtailstreamforms.egg-info/PKG-INFO → wagtailstreamforms-5.3.0/README.rst +42 -25
  3. wagtailstreamforms-5.3.0/pyproject.toml +89 -0
  4. wagtailstreamforms-5.3.0/wagtailstreamforms/__init__.py +7 -0
  5. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/management/commands/prunesubmissions.py +1 -1
  6. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/models/form.py +6 -6
  7. wagtailstreamforms-5.2.6/README.rst → wagtailstreamforms-5.3.0/wagtailstreamforms.egg-info/PKG-INFO +80 -0
  8. wagtailstreamforms-5.3.0/wagtailstreamforms.egg-info/requires.txt +4 -0
  9. wagtailstreamforms-5.2.6/pyproject.toml +0 -59
  10. wagtailstreamforms-5.2.6/wagtailstreamforms/__init__.py +0 -1
  11. wagtailstreamforms-5.2.6/wagtailstreamforms.egg-info/requires.txt +0 -7
  12. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/LICENSE +0 -0
  13. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/MANIFEST.in +0 -0
  14. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/setup.cfg +0 -0
  15. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/tests/test_case.py +0 -0
  16. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/tests/test_urls.py +0 -0
  17. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/tests/test_utils.py +0 -0
  18. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/blocks.py +0 -0
  19. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/conf.py +0 -0
  20. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/fields.py +0 -0
  21. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/forms.py +0 -0
  22. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/hooks.py +0 -0
  23. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/locale/es/LC_MESSAGES/django.mo +0 -0
  24. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/locale/es/LC_MESSAGES/django.po +0 -0
  25. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/locale/nl/LC_MESSAGES/django.mo +0 -0
  26. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/locale/nl/LC_MESSAGES/django.po +0 -0
  27. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/locale/tr/LC_MESSAGES/django.mo +0 -0
  28. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/locale/tr/LC_MESSAGES/django.po +0 -0
  29. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/management/__init__.py +0 -0
  30. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/management/commands/__init__.py +0 -0
  31. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/migrations/0001_initial.py +0 -0
  32. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/migrations/0002_form_site.py +0 -0
  33. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/migrations/0003_alter_form_fields.py +0 -0
  34. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/migrations/__init__.py +0 -0
  35. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/models/__init__.py +0 -0
  36. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/models/abstract.py +0 -0
  37. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/models/file.py +0 -0
  38. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/models/submission.py +0 -0
  39. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/serializers.py +0 -0
  40. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/streamfield.py +0 -0
  41. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/templates/streamforms/advanced_settings.html +0 -0
  42. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/templates/streamforms/confirm_copy.html +0 -0
  43. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/templates/streamforms/confirm_delete.html +0 -0
  44. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/templates/streamforms/form_block.html +0 -0
  45. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/templates/streamforms/index_submissions.html +0 -0
  46. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/templates/streamforms/list_submissions.html +0 -0
  47. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/templates/streamforms/non_existent_form.html +0 -0
  48. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/templates/streamforms/partials/form_field.html +0 -0
  49. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/templates/streamforms/partials/pagination_nav.html +0 -0
  50. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/templates/streamforms/wagtailadmin/shared/datetimepicker_translations.html +0 -0
  51. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/templatetags/__init__.py +0 -0
  52. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/templatetags/streamforms_tags.py +0 -0
  53. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/urls.py +0 -0
  54. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/utils/__init__.py +0 -0
  55. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/utils/apps.py +0 -0
  56. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/utils/general.py +0 -0
  57. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/utils/loading.py +0 -0
  58. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/utils/requests.py +0 -0
  59. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/utils/version.py +0 -0
  60. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/views/__init__.py +0 -0
  61. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/views/advanced_settings.py +0 -0
  62. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/views/copy.py +0 -0
  63. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/views/submission_delete.py +0 -0
  64. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/views/submission_list.py +0 -0
  65. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/wagtail_hooks.py +0 -0
  66. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/wagtailstreamforms_fields.py +0 -0
  67. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms/wagtailstreamforms_hooks.py +0 -0
  68. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms.egg-info/SOURCES.txt +0 -0
  69. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms.egg-info/dependency_links.txt +0 -0
  70. {wagtailstreamforms-5.2.6 → wagtailstreamforms-5.3.0}/wagtailstreamforms.egg-info/top_level.txt +0 -0
@@ -1,26 +1,39 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wagtailstreamforms
3
- Version: 5.2.6
3
+ Version: 5.3.0
4
+ Summary: Wagtail forms in a streamfield
4
5
  Author-email: Lab Digital BV <info@labdigital.nl>
5
- License: Proprietary
6
- Classifier: License :: Other/Proprietary License
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/labd/wagtailstreamforms
8
+ Project-URL: Documentation, https://wagtailstreamforms.readthedocs.io/
9
+ Project-URL: Changelog, https://github.com/labd/wagtailstreamforms/blob/master/CHANGELOG.rst
10
+ Project-URL: Issues, https://github.com/labd/wagtailstreamforms/issues
11
+ Keywords: wagtail,streamfield,forms
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: OS Independent
7
15
  Classifier: Programming Language :: Python
8
16
  Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.9
10
17
  Classifier: Programming Language :: Python :: 3.10
11
18
  Classifier: Programming Language :: Python :: 3.11
12
19
  Classifier: Programming Language :: Python :: 3.12
13
20
  Classifier: Programming Language :: Python :: 3.13
14
- Requires-Python: >=3.9
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Framework :: Django
23
+ Classifier: Framework :: Django :: 5.2
24
+ Classifier: Framework :: Django :: 6.0
25
+ Classifier: Framework :: Django :: 6.1
26
+ Classifier: Framework :: Wagtail
27
+ Classifier: Framework :: Wagtail :: 7
28
+ Classifier: Framework :: Wagtail :: 8
29
+ Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
30
+ Requires-Python: >=3.10
15
31
  Description-Content-Type: text/x-rst
16
32
  License-File: LICENSE
17
- Requires-Dist: wagtail<8.0,>=6.0
33
+ Requires-Dist: wagtail<9.0,>=7.0
18
34
  Requires-Dist: Unidecode<2.0,>=0.04.14
19
- Requires-Dist: wagtail-generic-chooser>=0.7.0
20
- Requires-Dist: wagtail-modeladmin>=2.2.0
21
- Requires-Dist: django-recaptcha>=4.0.0
22
- Requires-Dist: psycopg>=3.2.9
23
- Requires-Dist: tox>=4.26.0
35
+ Requires-Dist: wagtail-generic-chooser>=0.8
36
+ Requires-Dist: wagtail-modeladmin>=2.5.0
24
37
  Dynamic: license-file
25
38
 
26
39
  Wagtail StreamForms
@@ -34,6 +47,33 @@ of file fields. Form submissions are controlled by hooks that you can add that p
34
47
  Templates can be created which will then appear as choices when you build your form,
35
48
  allowing you to display and submit a form however you want.
36
49
 
50
+ Installation
51
+ ------------
52
+
53
+ .. code:: bash
54
+
55
+ $ pip install wagtailstreamforms
56
+
57
+ or, in a project managed with `uv <https://docs.astral.sh/uv/>`_:
58
+
59
+ .. code:: bash
60
+
61
+ $ uv add wagtailstreamforms
62
+
63
+ Then follow the `installation guide <https://wagtailstreamforms.readthedocs.io/en/latest/installation.html>`_.
64
+
65
+ Compatibility
66
+ -------------
67
+
68
+ ================== ============== ========================== ===============
69
+ wagtailstreamforms Wagtail Django Python
70
+ ================== ============== ========================== ===============
71
+ 5.3 7.0 - 8.x 5.2, 6.0, 6.1 [#django]_ 3.10 - 3.14
72
+ 5.1 - 5.2 6.0 - 7.x as supported by Wagtail 3.9+
73
+ ================== ============== ========================== ===============
74
+
75
+ .. [#django] Whichever of these the installed Wagtail version supports. Django 6.x requires Python 3.12+.
76
+
37
77
  Backwards Compatibility
38
78
  -----------------------
39
79
 
@@ -90,6 +130,21 @@ Screenshots
90
130
 
91
131
  Form Fields Selection
92
132
 
133
+ Development
134
+ -----------
135
+
136
+ The project is managed with `uv <https://docs.astral.sh/uv/>`_.
137
+
138
+ .. code:: bash
139
+
140
+ $ git clone https://github.com/labd/wagtailstreamforms.git
141
+ $ cd wagtailstreamforms
142
+ $ make install # uv sync --all-groups
143
+ $ make test # run the test suite against the locked versions
144
+ $ make tox # run the full Python/Django/Wagtail matrix via tox-uv
145
+ $ make format # ruff
146
+ $ make docs # build the Sphinx documentation
147
+
93
148
  Example site with docker
94
149
  ------------------------
95
150
 
@@ -1,28 +1,3 @@
1
- Metadata-Version: 2.4
2
- Name: wagtailstreamforms
3
- Version: 5.2.6
4
- Author-email: Lab Digital BV <info@labdigital.nl>
5
- License: Proprietary
6
- Classifier: License :: Other/Proprietary License
7
- Classifier: Programming Language :: Python
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.9
10
- Classifier: Programming Language :: Python :: 3.10
11
- Classifier: Programming Language :: Python :: 3.11
12
- Classifier: Programming Language :: Python :: 3.12
13
- Classifier: Programming Language :: Python :: 3.13
14
- Requires-Python: >=3.9
15
- Description-Content-Type: text/x-rst
16
- License-File: LICENSE
17
- Requires-Dist: wagtail<8.0,>=6.0
18
- Requires-Dist: Unidecode<2.0,>=0.04.14
19
- Requires-Dist: wagtail-generic-chooser>=0.7.0
20
- Requires-Dist: wagtail-modeladmin>=2.2.0
21
- Requires-Dist: django-recaptcha>=4.0.0
22
- Requires-Dist: psycopg>=3.2.9
23
- Requires-Dist: tox>=4.26.0
24
- Dynamic: license-file
25
-
26
1
  Wagtail StreamForms
27
2
  ===================
28
3
 
@@ -34,6 +9,33 @@ of file fields. Form submissions are controlled by hooks that you can add that p
34
9
  Templates can be created which will then appear as choices when you build your form,
35
10
  allowing you to display and submit a form however you want.
36
11
 
12
+ Installation
13
+ ------------
14
+
15
+ .. code:: bash
16
+
17
+ $ pip install wagtailstreamforms
18
+
19
+ or, in a project managed with `uv <https://docs.astral.sh/uv/>`_:
20
+
21
+ .. code:: bash
22
+
23
+ $ uv add wagtailstreamforms
24
+
25
+ Then follow the `installation guide <https://wagtailstreamforms.readthedocs.io/en/latest/installation.html>`_.
26
+
27
+ Compatibility
28
+ -------------
29
+
30
+ ================== ============== ========================== ===============
31
+ wagtailstreamforms Wagtail Django Python
32
+ ================== ============== ========================== ===============
33
+ 5.3 7.0 - 8.x 5.2, 6.0, 6.1 [#django]_ 3.10 - 3.14
34
+ 5.1 - 5.2 6.0 - 7.x as supported by Wagtail 3.9+
35
+ ================== ============== ========================== ===============
36
+
37
+ .. [#django] Whichever of these the installed Wagtail version supports. Django 6.x requires Python 3.12+.
38
+
37
39
  Backwards Compatibility
38
40
  -----------------------
39
41
 
@@ -90,6 +92,21 @@ Screenshots
90
92
 
91
93
  Form Fields Selection
92
94
 
95
+ Development
96
+ -----------
97
+
98
+ The project is managed with `uv <https://docs.astral.sh/uv/>`_.
99
+
100
+ .. code:: bash
101
+
102
+ $ git clone https://github.com/labd/wagtailstreamforms.git
103
+ $ cd wagtailstreamforms
104
+ $ make install # uv sync --all-groups
105
+ $ make test # run the test suite against the locked versions
106
+ $ make tox # run the full Python/Django/Wagtail matrix via tox-uv
107
+ $ make format # ruff
108
+ $ make docs # build the Sphinx documentation
109
+
93
110
  Example site with docker
94
111
  ------------------------
95
112
 
@@ -0,0 +1,89 @@
1
+ [tool.djlint]
2
+ format_css = false
3
+ ignore = "H031"
4
+
5
+ [tool.ruff]
6
+ line-length = 99
7
+ extend-exclude = ["**/migrations/"]
8
+ lint.select = ["E4", "E7", "E9", "F", "I"]
9
+ lint.extend-ignore = ["F405", "E731"]
10
+
11
+ [tool.pytest.ini_options]
12
+ DJANGO_SETTINGS_MODULE = "tests.settings"
13
+ testpaths = ["tests/"]
14
+ django_find_project = false
15
+ addopts = ["--nomigrations"]
16
+ filterwarnings = [
17
+ "ignore::DeprecationWarning",
18
+ "ignore::PendingDeprecationWarning",
19
+ ]
20
+
21
+ [dependency-groups]
22
+ dev = [
23
+ "django-recaptcha>=4.0.0",
24
+ "pre-commit",
25
+ "psycopg>=3.2.9",
26
+ "pytest",
27
+ "pytest-django",
28
+ "ruff",
29
+ "tox>=4.26.0",
30
+ "tox-uv",
31
+ ]
32
+ docs = [
33
+ "karma-sphinx-theme>=0.0.8",
34
+ # karma-sphinx-theme uses the "style" template field that Sphinx 7 removed
35
+ "sphinx<7",
36
+ "sphinx-autobuild",
37
+ ]
38
+
39
+ [tool.setuptools.packages.find]
40
+ include = ["wagtailstreamforms*"]
41
+ exclude = ["tests*", "docs*"]
42
+
43
+
44
+ [project]
45
+ name = "wagtailstreamforms"
46
+ version = "5.3.0"
47
+ description = "Wagtail forms in a streamfield"
48
+ authors = [{ name = "Lab Digital BV", email = "info@labdigital.nl" }]
49
+ dependencies = [
50
+ "wagtail>=7.0,<9.0",
51
+ "Unidecode>=0.04.14,<2.0",
52
+ "wagtail-generic-chooser>=0.8",
53
+ "wagtail-modeladmin>=2.5.0",
54
+ ]
55
+ requires-python = ">=3.10"
56
+ readme = "README.rst"
57
+ license = "MIT"
58
+ license-files = ["LICENSE"]
59
+ keywords = ["wagtail", "streamfield", "forms"]
60
+ classifiers = [
61
+ "Development Status :: 5 - Production/Stable",
62
+ "Intended Audience :: Developers",
63
+ "Operating System :: OS Independent",
64
+ "Programming Language :: Python",
65
+ "Programming Language :: Python :: 3",
66
+ "Programming Language :: Python :: 3.10",
67
+ "Programming Language :: Python :: 3.11",
68
+ "Programming Language :: Python :: 3.12",
69
+ "Programming Language :: Python :: 3.13",
70
+ "Programming Language :: Python :: 3.14",
71
+ "Framework :: Django",
72
+ "Framework :: Django :: 5.2",
73
+ "Framework :: Django :: 6.0",
74
+ "Framework :: Django :: 6.1",
75
+ "Framework :: Wagtail",
76
+ "Framework :: Wagtail :: 7",
77
+ "Framework :: Wagtail :: 8",
78
+ "Topic :: Internet :: WWW/HTTP :: Site Management",
79
+ ]
80
+
81
+ [project.urls]
82
+ Homepage = "https://github.com/labd/wagtailstreamforms"
83
+ Documentation = "https://wagtailstreamforms.readthedocs.io/"
84
+ Changelog = "https://github.com/labd/wagtailstreamforms/blob/master/CHANGELOG.rst"
85
+ Issues = "https://github.com/labd/wagtailstreamforms/issues"
86
+
87
+ [build-system]
88
+ requires = ["setuptools>=77"]
89
+ build-backend = "setuptools.build_meta"
@@ -0,0 +1,7 @@
1
+ from importlib.metadata import PackageNotFoundError, version
2
+
3
+ try:
4
+ __version__ = version("wagtailstreamforms")
5
+ except PackageNotFoundError: # pragma: no cover
6
+ # running from a source checkout that was never installed
7
+ __version__ = "0.0.0"
@@ -12,7 +12,7 @@ class Command(BaseCommand):
12
12
  parser.add_argument("days_to_keep", type=int)
13
13
 
14
14
  def get_queryset(self, date):
15
- return FormSubmission.objects.filter(submit_time__lt=date)
15
+ return FormSubmission.objects.filter(submit_time__date__lt=date)
16
16
 
17
17
  def handle(self, *args, **options):
18
18
  keep_from_date = datetime.today().date() - timedelta(days=options["days_to_keep"])
@@ -3,7 +3,6 @@ import uuid
3
3
  from django.conf import settings
4
4
  from django.db import models
5
5
  from django.utils.translation import gettext_lazy as _
6
- from wagtail import VERSION as WAGTAIL_VERSION
7
6
  from wagtail.admin.panels import (
8
7
  FieldPanel,
9
8
  MultiFieldPanel,
@@ -141,8 +140,12 @@ class AbstractForm(models.Model):
141
140
  """Returns a list of tuples with (field_name, field_label)."""
142
141
 
143
142
  data_fields = [("submit_time", _("Submission date"))]
143
+ # same key as BaseField.get_formfield_name, so fields with a custom name show their data
144
144
  data_fields += [
145
- (get_slug_from_string(field["value"]["label"]), field["value"]["label"])
145
+ (
146
+ field["value"].get("name") or get_slug_from_string(field["value"]["label"]),
147
+ field["value"]["label"],
148
+ )
146
149
  for field in self.get_form_fields()
147
150
  ]
148
151
  if getattr(settings, "WAGTAILSTREAMFORMS_SHOW_FORM_REFERENCE", False):
@@ -163,10 +166,7 @@ class AbstractForm(models.Model):
163
166
  def get_form_fields(self):
164
167
  """Returns the form field's stream data."""
165
168
 
166
- if WAGTAIL_VERSION >= (2, 12):
167
- form_fields = self.fields.raw_data
168
- else:
169
- form_fields = self.fields.stream_data
169
+ form_fields = self.fields.raw_data
170
170
  for fn in hooks.get_hooks("construct_submission_form_fields"):
171
171
  form_fields = fn(form_fields)
172
172
  return form_fields
@@ -1,3 +1,41 @@
1
+ Metadata-Version: 2.4
2
+ Name: wagtailstreamforms
3
+ Version: 5.3.0
4
+ Summary: Wagtail forms in a streamfield
5
+ Author-email: Lab Digital BV <info@labdigital.nl>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/labd/wagtailstreamforms
8
+ Project-URL: Documentation, https://wagtailstreamforms.readthedocs.io/
9
+ Project-URL: Changelog, https://github.com/labd/wagtailstreamforms/blob/master/CHANGELOG.rst
10
+ Project-URL: Issues, https://github.com/labd/wagtailstreamforms/issues
11
+ Keywords: wagtail,streamfield,forms
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Framework :: Django
23
+ Classifier: Framework :: Django :: 5.2
24
+ Classifier: Framework :: Django :: 6.0
25
+ Classifier: Framework :: Django :: 6.1
26
+ Classifier: Framework :: Wagtail
27
+ Classifier: Framework :: Wagtail :: 7
28
+ Classifier: Framework :: Wagtail :: 8
29
+ Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
30
+ Requires-Python: >=3.10
31
+ Description-Content-Type: text/x-rst
32
+ License-File: LICENSE
33
+ Requires-Dist: wagtail<9.0,>=7.0
34
+ Requires-Dist: Unidecode<2.0,>=0.04.14
35
+ Requires-Dist: wagtail-generic-chooser>=0.8
36
+ Requires-Dist: wagtail-modeladmin>=2.5.0
37
+ Dynamic: license-file
38
+
1
39
  Wagtail StreamForms
2
40
  ===================
3
41
 
@@ -9,6 +47,33 @@ of file fields. Form submissions are controlled by hooks that you can add that p
9
47
  Templates can be created which will then appear as choices when you build your form,
10
48
  allowing you to display and submit a form however you want.
11
49
 
50
+ Installation
51
+ ------------
52
+
53
+ .. code:: bash
54
+
55
+ $ pip install wagtailstreamforms
56
+
57
+ or, in a project managed with `uv <https://docs.astral.sh/uv/>`_:
58
+
59
+ .. code:: bash
60
+
61
+ $ uv add wagtailstreamforms
62
+
63
+ Then follow the `installation guide <https://wagtailstreamforms.readthedocs.io/en/latest/installation.html>`_.
64
+
65
+ Compatibility
66
+ -------------
67
+
68
+ ================== ============== ========================== ===============
69
+ wagtailstreamforms Wagtail Django Python
70
+ ================== ============== ========================== ===============
71
+ 5.3 7.0 - 8.x 5.2, 6.0, 6.1 [#django]_ 3.10 - 3.14
72
+ 5.1 - 5.2 6.0 - 7.x as supported by Wagtail 3.9+
73
+ ================== ============== ========================== ===============
74
+
75
+ .. [#django] Whichever of these the installed Wagtail version supports. Django 6.x requires Python 3.12+.
76
+
12
77
  Backwards Compatibility
13
78
  -----------------------
14
79
 
@@ -65,6 +130,21 @@ Screenshots
65
130
 
66
131
  Form Fields Selection
67
132
 
133
+ Development
134
+ -----------
135
+
136
+ The project is managed with `uv <https://docs.astral.sh/uv/>`_.
137
+
138
+ .. code:: bash
139
+
140
+ $ git clone https://github.com/labd/wagtailstreamforms.git
141
+ $ cd wagtailstreamforms
142
+ $ make install # uv sync --all-groups
143
+ $ make test # run the test suite against the locked versions
144
+ $ make tox # run the full Python/Django/Wagtail matrix via tox-uv
145
+ $ make format # ruff
146
+ $ make docs # build the Sphinx documentation
147
+
68
148
  Example site with docker
69
149
  ------------------------
70
150
 
@@ -0,0 +1,4 @@
1
+ wagtail<9.0,>=7.0
2
+ Unidecode<2.0,>=0.04.14
3
+ wagtail-generic-chooser>=0.8
4
+ wagtail-modeladmin>=2.5.0
@@ -1,59 +0,0 @@
1
- [tool.djlint]
2
- format_css = false
3
- ignore = "H031"
4
-
5
- [tool.ruff]
6
- line-length = 99
7
- extend-exclude = ["**/migrations/"]
8
- lint.extend-select = ["I"]
9
- lint.extend-ignore = ["F405", "E731"]
10
-
11
- [tool.pytest.ini_options]
12
- DJANGO_SETTINGS_MODULE = "tests.settings"
13
- testpaths = ["tests/"]
14
- django_find_project = false
15
- addopts = ["--nomigrations"]
16
- filterwarnings = [
17
- "ignore::DeprecationWarning",
18
- "ignore::PendingDeprecationWarning",
19
- ]
20
-
21
- [tool.uv]
22
- dev-dependencies = ["mock", "pytest-django", "pytest", "pre-commit", "ruff"]
23
-
24
- [tool.setuptools.packages.find]
25
- include = ["wagtailstreamforms*"]
26
- exclude = ["tests*", "docs*"]
27
-
28
-
29
- [project]
30
- name = "wagtailstreamforms"
31
- version = "5.2.6"
32
- description = ""
33
- authors = [{ name = "Lab Digital BV", email = "info@labdigital.nl" }]
34
- dependencies = [
35
- "wagtail>=6.0,<8.0",
36
- "Unidecode>=0.04.14,<2.0",
37
- "wagtail-generic-chooser>=0.7.0",
38
- "wagtail-modeladmin>=2.2.0",
39
- "django-recaptcha>=4.0.0",
40
- "psycopg>=3.2.9",
41
- "tox>=4.26.0",
42
- ]
43
- requires-python = ">=3.9"
44
- readme = "README.rst"
45
- license = { text = "Proprietary" }
46
- classifiers = [
47
- "License :: Other/Proprietary License",
48
- "Programming Language :: Python",
49
- "Programming Language :: Python :: 3",
50
- "Programming Language :: Python :: 3.9",
51
- "Programming Language :: Python :: 3.10",
52
- "Programming Language :: Python :: 3.11",
53
- "Programming Language :: Python :: 3.12",
54
- "Programming Language :: Python :: 3.13",
55
- ]
56
-
57
- [build-system]
58
- requires = ["setuptools", "wheel"]
59
- build-backend = "setuptools.build_meta"
@@ -1 +0,0 @@
1
- __version__ = "4.1.0"
@@ -1,7 +0,0 @@
1
- wagtail<8.0,>=6.0
2
- Unidecode<2.0,>=0.04.14
3
- wagtail-generic-chooser>=0.7.0
4
- wagtail-modeladmin>=2.2.0
5
- django-recaptcha>=4.0.0
6
- psycopg>=3.2.9
7
- tox>=4.26.0