wagtailstreamforms 0.0.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 (173) hide show
  1. wagtailstreamforms-0.0.0/.coveragerc +11 -0
  2. wagtailstreamforms-0.0.0/.dockerignore +11 -0
  3. wagtailstreamforms-0.0.0/.github/CODE_OF_CONDUCT.md +46 -0
  4. wagtailstreamforms-0.0.0/.github/CONTRIBUTING.md +15 -0
  5. wagtailstreamforms-0.0.0/.github/ISSUE_TEMPLATE.md +7 -0
  6. wagtailstreamforms-0.0.0/.github/workflows/nightly-tests.yml +51 -0
  7. wagtailstreamforms-0.0.0/.github/workflows/python-release.yml +29 -0
  8. wagtailstreamforms-0.0.0/.github/workflows/python-test.yml +49 -0
  9. wagtailstreamforms-0.0.0/.gitignore +18 -0
  10. wagtailstreamforms-0.0.0/.pre-commit-config.yaml +16 -0
  11. wagtailstreamforms-0.0.0/CHANGELOG.rst +262 -0
  12. wagtailstreamforms-0.0.0/Dockerfile +36 -0
  13. wagtailstreamforms-0.0.0/LICENSE +19 -0
  14. wagtailstreamforms-0.0.0/MANIFEST.in +2 -0
  15. wagtailstreamforms-0.0.0/Makefile +31 -0
  16. wagtailstreamforms-0.0.0/PKG-INFO +24 -0
  17. wagtailstreamforms-0.0.0/README.rst +101 -0
  18. wagtailstreamforms-0.0.0/docker-compose.yml +32 -0
  19. wagtailstreamforms-0.0.0/docker-entrypoint.sh +24 -0
  20. wagtailstreamforms-0.0.0/docs/Makefile +20 -0
  21. wagtailstreamforms-0.0.0/docs/README.md +17 -0
  22. wagtailstreamforms-0.0.0/docs/_static/images/screen_1.png +0 -0
  23. wagtailstreamforms-0.0.0/docs/_static/images/screen_2.png +0 -0
  24. wagtailstreamforms-0.0.0/docs/_static/images/screen_3.png +0 -0
  25. wagtailstreamforms-0.0.0/docs/_static/images/screen_4.png +0 -0
  26. wagtailstreamforms-0.0.0/docs/advanced.rst +42 -0
  27. wagtailstreamforms-0.0.0/docs/changelog.rst +1 -0
  28. wagtailstreamforms-0.0.0/docs/conf.py +166 -0
  29. wagtailstreamforms-0.0.0/docs/contributors.rst +20 -0
  30. wagtailstreamforms-0.0.0/docs/fields.rst +335 -0
  31. wagtailstreamforms-0.0.0/docs/hooks.rst +74 -0
  32. wagtailstreamforms-0.0.0/docs/housekeeping.rst +22 -0
  33. wagtailstreamforms-0.0.0/docs/index.rst +69 -0
  34. wagtailstreamforms-0.0.0/docs/installation.rst +27 -0
  35. wagtailstreamforms-0.0.0/docs/permissions.rst +21 -0
  36. wagtailstreamforms-0.0.0/docs/requirements.txt +1 -0
  37. wagtailstreamforms-0.0.0/docs/screenshots.rst +22 -0
  38. wagtailstreamforms-0.0.0/docs/settings.rst +32 -0
  39. wagtailstreamforms-0.0.0/docs/submission.rst +101 -0
  40. wagtailstreamforms-0.0.0/docs/templates.rst +89 -0
  41. wagtailstreamforms-0.0.0/docs/usage.rst +41 -0
  42. wagtailstreamforms-0.0.0/example/migrations/0001_initial.py +30 -0
  43. wagtailstreamforms-0.0.0/example/migrations/0002_advancedformsetting.py +26 -0
  44. wagtailstreamforms-0.0.0/example/migrations/0003_alter_basicpage_body.py +48 -0
  45. wagtailstreamforms-0.0.0/example/migrations/__init__.py +0 -0
  46. wagtailstreamforms-0.0.0/example/models.py +26 -0
  47. wagtailstreamforms-0.0.0/example/scss/_variables.scss +21 -0
  48. wagtailstreamforms-0.0.0/example/scss/karma.scss +13 -0
  49. wagtailstreamforms-0.0.0/example/scss/module/_form.scss +35 -0
  50. wagtailstreamforms-0.0.0/example/scss/module/_layout.scss +29 -0
  51. wagtailstreamforms-0.0.0/example/scss/module/_message.scss +25 -0
  52. wagtailstreamforms-0.0.0/example/settings.py +155 -0
  53. wagtailstreamforms-0.0.0/example/static/css/karma.css +2221 -0
  54. wagtailstreamforms-0.0.0/example/static/css/karma.css.map +1 -0
  55. wagtailstreamforms-0.0.0/example/static/css/karma.min.css +2 -0
  56. wagtailstreamforms-0.0.0/example/static/css/karma.min.css.map +1 -0
  57. wagtailstreamforms-0.0.0/example/templates/example/basic_page.html +38 -0
  58. wagtailstreamforms-0.0.0/example/templates/streamforms/form_block.html +16 -0
  59. wagtailstreamforms-0.0.0/example/templates/streamforms/partials/form_field.html +6 -0
  60. wagtailstreamforms-0.0.0/example/urls.py +22 -0
  61. wagtailstreamforms-0.0.0/example/wagtailstreamforms_fields.py +91 -0
  62. wagtailstreamforms-0.0.0/example/wagtailstreamforms_hooks.py +42 -0
  63. wagtailstreamforms-0.0.0/example/wsgi.py +16 -0
  64. wagtailstreamforms-0.0.0/manage.py +10 -0
  65. wagtailstreamforms-0.0.0/package.json +38 -0
  66. wagtailstreamforms-0.0.0/postcss.config.js +14 -0
  67. wagtailstreamforms-0.0.0/pyproject.toml +60 -0
  68. wagtailstreamforms-0.0.0/readthedocs.yml +5 -0
  69. wagtailstreamforms-0.0.0/setup.cfg +4 -0
  70. wagtailstreamforms-0.0.0/tests/__init__.py +0 -0
  71. wagtailstreamforms-0.0.0/tests/blocks/__init__.py +0 -0
  72. wagtailstreamforms-0.0.0/tests/blocks/test_form_block.py +145 -0
  73. wagtailstreamforms-0.0.0/tests/blocks/test_form_chooser_block.py +31 -0
  74. wagtailstreamforms-0.0.0/tests/blocks/test_info_block.py +28 -0
  75. wagtailstreamforms-0.0.0/tests/fields/__init__.py +0 -0
  76. wagtailstreamforms-0.0.0/tests/fields/test_base_field.py +55 -0
  77. wagtailstreamforms-0.0.0/tests/fields/test_fields.py +205 -0
  78. wagtailstreamforms-0.0.0/tests/fields/test_hook_select_field.py +111 -0
  79. wagtailstreamforms-0.0.0/tests/fields/test_registering.py +22 -0
  80. wagtailstreamforms-0.0.0/tests/fields/test_streamfield.py +57 -0
  81. wagtailstreamforms-0.0.0/tests/fixtures/test.json +17 -0
  82. wagtailstreamforms-0.0.0/tests/forms/__init__.py +0 -0
  83. wagtailstreamforms-0.0.0/tests/forms/test_form_builder.py +53 -0
  84. wagtailstreamforms-0.0.0/tests/hooks/__init__.py +0 -0
  85. wagtailstreamforms-0.0.0/tests/hooks/test_process_form.py +257 -0
  86. wagtailstreamforms-0.0.0/tests/hooks/test_registering.py +56 -0
  87. wagtailstreamforms-0.0.0/tests/hooks/test_save_form_submission_data.py +63 -0
  88. wagtailstreamforms-0.0.0/tests/management/__init__.py +0 -0
  89. wagtailstreamforms-0.0.0/tests/management/test_prunesubmissions.py +24 -0
  90. wagtailstreamforms-0.0.0/tests/migrations/0001_initial.py +74 -0
  91. wagtailstreamforms-0.0.0/tests/migrations/__init__.py +0 -0
  92. wagtailstreamforms-0.0.0/tests/models/__init__.py +17 -0
  93. wagtailstreamforms-0.0.0/tests/models/test_form.py +217 -0
  94. wagtailstreamforms-0.0.0/tests/models/test_form_settings.py +26 -0
  95. wagtailstreamforms-0.0.0/tests/models/test_form_submission.py +45 -0
  96. wagtailstreamforms-0.0.0/tests/models/test_form_submission_file.py +54 -0
  97. wagtailstreamforms-0.0.0/tests/models/test_migrations.py +10 -0
  98. wagtailstreamforms-0.0.0/tests/serializers/__init__.py +0 -0
  99. wagtailstreamforms-0.0.0/tests/serializers/test_form_submission.py +33 -0
  100. wagtailstreamforms-0.0.0/tests/settings.py +86 -0
  101. wagtailstreamforms-0.0.0/tests/templatetags/__init__.py +0 -0
  102. wagtailstreamforms-0.0.0/tests/templatetags/test_form.py +48 -0
  103. wagtailstreamforms-0.0.0/tests/templatetags/test_url_replace.py +36 -0
  104. wagtailstreamforms-0.0.0/tests/test_case.py +88 -0
  105. wagtailstreamforms-0.0.0/tests/test_urls.py +17 -0
  106. wagtailstreamforms-0.0.0/tests/test_utils.py +35 -0
  107. wagtailstreamforms-0.0.0/tests/urls.py +10 -0
  108. wagtailstreamforms-0.0.0/tests/views/__init__.py +0 -0
  109. wagtailstreamforms-0.0.0/tests/views/test_admin_list.py +63 -0
  110. wagtailstreamforms-0.0.0/tests/views/test_advanced.py +41 -0
  111. wagtailstreamforms-0.0.0/tests/views/test_copy.py +94 -0
  112. wagtailstreamforms-0.0.0/tests/views/test_delete.py +111 -0
  113. wagtailstreamforms-0.0.0/tests/views/test_submission_list.py +128 -0
  114. wagtailstreamforms-0.0.0/tox.ini +57 -0
  115. wagtailstreamforms-0.0.0/uv.lock +992 -0
  116. wagtailstreamforms-0.0.0/wagtailstreamforms/__init__.py +1 -0
  117. wagtailstreamforms-0.0.0/wagtailstreamforms/blocks.py +93 -0
  118. wagtailstreamforms-0.0.0/wagtailstreamforms/conf.py +35 -0
  119. wagtailstreamforms-0.0.0/wagtailstreamforms/fields.py +218 -0
  120. wagtailstreamforms-0.0.0/wagtailstreamforms/forms.py +61 -0
  121. wagtailstreamforms-0.0.0/wagtailstreamforms/hooks.py +62 -0
  122. wagtailstreamforms-0.0.0/wagtailstreamforms/locale/es/LC_MESSAGES/django.mo +0 -0
  123. wagtailstreamforms-0.0.0/wagtailstreamforms/locale/es/LC_MESSAGES/django.po +328 -0
  124. wagtailstreamforms-0.0.0/wagtailstreamforms/locale/nl/LC_MESSAGES/django.mo +0 -0
  125. wagtailstreamforms-0.0.0/wagtailstreamforms/locale/nl/LC_MESSAGES/django.po +464 -0
  126. wagtailstreamforms-0.0.0/wagtailstreamforms/locale/tr/LC_MESSAGES/django.mo +0 -0
  127. wagtailstreamforms-0.0.0/wagtailstreamforms/locale/tr/LC_MESSAGES/django.po +317 -0
  128. wagtailstreamforms-0.0.0/wagtailstreamforms/management/__init__.py +0 -0
  129. wagtailstreamforms-0.0.0/wagtailstreamforms/management/commands/__init__.py +0 -0
  130. wagtailstreamforms-0.0.0/wagtailstreamforms/management/commands/prunesubmissions.py +29 -0
  131. wagtailstreamforms-0.0.0/wagtailstreamforms/migrations/0001_initial.py +555 -0
  132. wagtailstreamforms-0.0.0/wagtailstreamforms/migrations/0002_form_site.py +21 -0
  133. wagtailstreamforms-0.0.0/wagtailstreamforms/migrations/0003_alter_form_fields.py +20 -0
  134. wagtailstreamforms-0.0.0/wagtailstreamforms/migrations/__init__.py +0 -0
  135. wagtailstreamforms-0.0.0/wagtailstreamforms/models/__init__.py +39 -0
  136. wagtailstreamforms-0.0.0/wagtailstreamforms/models/abstract.py +15 -0
  137. wagtailstreamforms-0.0.0/wagtailstreamforms/models/file.py +35 -0
  138. wagtailstreamforms-0.0.0/wagtailstreamforms/models/form.py +188 -0
  139. wagtailstreamforms-0.0.0/wagtailstreamforms/models/submission.py +27 -0
  140. wagtailstreamforms-0.0.0/wagtailstreamforms/serializers.py +11 -0
  141. wagtailstreamforms-0.0.0/wagtailstreamforms/streamfield.py +48 -0
  142. wagtailstreamforms-0.0.0/wagtailstreamforms/templates/streamforms/advanced_settings.html +25 -0
  143. wagtailstreamforms-0.0.0/wagtailstreamforms/templates/streamforms/confirm_copy.html +26 -0
  144. wagtailstreamforms-0.0.0/wagtailstreamforms/templates/streamforms/confirm_delete.html +23 -0
  145. wagtailstreamforms-0.0.0/wagtailstreamforms/templates/streamforms/form_block.html +10 -0
  146. wagtailstreamforms-0.0.0/wagtailstreamforms/templates/streamforms/index_submissions.html +104 -0
  147. wagtailstreamforms-0.0.0/wagtailstreamforms/templates/streamforms/list_submissions.html +56 -0
  148. wagtailstreamforms-0.0.0/wagtailstreamforms/templates/streamforms/non_existent_form.html +2 -0
  149. wagtailstreamforms-0.0.0/wagtailstreamforms/templates/streamforms/partials/form_field.html +6 -0
  150. wagtailstreamforms-0.0.0/wagtailstreamforms/templates/streamforms/partials/pagination_nav.html +17 -0
  151. wagtailstreamforms-0.0.0/wagtailstreamforms/templates/streamforms/wagtailadmin/shared/datetimepicker_translations.html +39 -0
  152. wagtailstreamforms-0.0.0/wagtailstreamforms/templatetags/__init__.py +0 -0
  153. wagtailstreamforms-0.0.0/wagtailstreamforms/templatetags/streamforms_tags.py +43 -0
  154. wagtailstreamforms-0.0.0/wagtailstreamforms/urls.py +31 -0
  155. wagtailstreamforms-0.0.0/wagtailstreamforms/utils/__init__.py +0 -0
  156. wagtailstreamforms-0.0.0/wagtailstreamforms/utils/apps.py +25 -0
  157. wagtailstreamforms-0.0.0/wagtailstreamforms/utils/general.py +6 -0
  158. wagtailstreamforms-0.0.0/wagtailstreamforms/utils/loading.py +30 -0
  159. wagtailstreamforms-0.0.0/wagtailstreamforms/utils/requests.py +13 -0
  160. wagtailstreamforms-0.0.0/wagtailstreamforms/utils/version.py +0 -0
  161. wagtailstreamforms-0.0.0/wagtailstreamforms/views/__init__.py +4 -0
  162. wagtailstreamforms-0.0.0/wagtailstreamforms/views/advanced_settings.py +51 -0
  163. wagtailstreamforms-0.0.0/wagtailstreamforms/views/copy.py +83 -0
  164. wagtailstreamforms-0.0.0/wagtailstreamforms/views/submission_delete.py +73 -0
  165. wagtailstreamforms-0.0.0/wagtailstreamforms/views/submission_list.py +112 -0
  166. wagtailstreamforms-0.0.0/wagtailstreamforms/wagtail_hooks.py +255 -0
  167. wagtailstreamforms-0.0.0/wagtailstreamforms/wagtailstreamforms_fields.py +274 -0
  168. wagtailstreamforms-0.0.0/wagtailstreamforms/wagtailstreamforms_hooks.py +31 -0
  169. wagtailstreamforms-0.0.0/wagtailstreamforms.egg-info/PKG-INFO +24 -0
  170. wagtailstreamforms-0.0.0/wagtailstreamforms.egg-info/SOURCES.txt +171 -0
  171. wagtailstreamforms-0.0.0/wagtailstreamforms.egg-info/dependency_links.txt +1 -0
  172. wagtailstreamforms-0.0.0/wagtailstreamforms.egg-info/requires.txt +7 -0
  173. wagtailstreamforms-0.0.0/wagtailstreamforms.egg-info/top_level.txt +1 -0
@@ -0,0 +1,11 @@
1
+ [run]
2
+ branch = True
3
+ source = wagtailstreamforms
4
+ omit =
5
+ */migrations/*
6
+ parallel = true
7
+
8
+ [report]
9
+ exclude_lines =
10
+ pragma: no cover
11
+ raise NotImplementedError
@@ -0,0 +1,11 @@
1
+ .cache
2
+ .coverage
3
+ .DS_Store
4
+ .idea
5
+ .python-version
6
+ .tox
7
+ dist
8
+ htmlcov
9
+ images
10
+ node_modules
11
+ wagtailstreamforms.egg-info
@@ -0,0 +1,46 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ * Using welcoming and inclusive language
12
+ * Being respectful of differing viewpoints and experiences
13
+ * Gracefully accepting constructive criticism
14
+ * Focusing on what is best for the community
15
+ * Showing empathy towards other community members
16
+
17
+ Examples of unacceptable behavior by participants include:
18
+
19
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+ * Trolling, insulting/derogatory comments, and personal or political attacks
21
+ * Public or private harassment
22
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Our Responsibilities
26
+
27
+ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at support@accentdesign.co.uk. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
+
39
+ Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
+
41
+ ## Attribution
42
+
43
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44
+
45
+ [homepage]: http://contributor-covenant.org
46
+ [version]: http://contributor-covenant.org/version/1/4/
@@ -0,0 +1,15 @@
1
+ # Contributing
2
+
3
+ When contributing to this repository, please first discuss the change you wish to make via issue,
4
+ email, or any other method with the owners of this repository before making a change.
5
+
6
+ Please note we have a code of conduct, please follow it in all your interactions with the project.
7
+
8
+ ## Pull Request Process
9
+
10
+ 1. Please ensure pull requests only contain changes for the feature/bug in question.
11
+ 2. Update the README.rst with details of changes where applicable.
12
+ 3. Update the docs with any relevant documentation.
13
+ 4. Your Pull Request will be reviewed by at least one other developer and merged when appropriate.
14
+ 5. If you are new to pull requests or just wish to request a new feature/idea feel free to raise an issue or
15
+ contact us directly [support@accentdesign.co.uk](mailto://stuart@accentdesign.co.uk).
@@ -0,0 +1,7 @@
1
+ ### Expected behaviour
2
+
3
+
4
+ ### Actual behaviour
5
+
6
+
7
+ ### Steps to reproduce the behaviour
@@ -0,0 +1,51 @@
1
+ # Test against the Wagtail main branch, nightly, as this is required by Wagtail Nest:
2
+ # https://github.com/wagtail-nest
3
+
4
+ name: Nightly Wagtail test
5
+
6
+ on:
7
+ schedule:
8
+ - cron: "0 0 * * *"
9
+
10
+ workflow_dispatch:
11
+
12
+ jobs:
13
+ nightly-test:
14
+ # Cannot check the existence of secrets, so limiting to repository name to prevent
15
+ # all forks to run nightly. See: https://github.com/actions/runner/issues/520
16
+ if: ${{ github.repository == 'labd/wagtailstreamforms' }}
17
+ runs-on: ubuntu-latest
18
+
19
+ services:
20
+ postgres:
21
+ image: postgres:10.8
22
+ ports:
23
+ - 5432:5432
24
+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
25
+
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+
29
+ - name: Install uv
30
+ uses: astral-sh/setup-uv@v5
31
+
32
+ - name: Set up Python 3.13
33
+ uses: actions/setup-python@v5
34
+ with:
35
+ python-version: 3.13
36
+ - name: Install dependencies
37
+ run: |
38
+ uv add "psycopg2>=2.6"
39
+ uv pip install "git+https://github.com/wagtail/wagtail.git@main#egg=wagtail"
40
+ uv pip install -e .[test]
41
+ - name: Test
42
+ id: test
43
+ continue-on-error: true
44
+ run: |
45
+ ./manage.py test
46
+ env:
47
+ DATABASE_ENGINE: django.db.backends.postgresql
48
+ DATABASE_HOST: localhost
49
+ DATABASE_USER: postgres
50
+ DATABASE_PASS: postgres
51
+ DJANGO_SETTINGS_MODULE: tests.settings
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: Release to PyPi
3
+
4
+ on:
5
+ release:
6
+ types: [created]
7
+
8
+ jobs:
9
+ release:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - name: Install uv
15
+ uses: astral-sh/setup-uv@v5
16
+
17
+ - name: Set up Python 3.13
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: 3.13
21
+ - name: Install build requirements
22
+ run: python -m pip install wheel
23
+ - name: Build package
24
+ run: uv build --sdist --wheel
25
+ - name: Publish package
26
+ uses: pypa/gh-action-pypi-publish@release/v1
27
+ with:
28
+ user: __token__
29
+ password: ${{ secrets.pypi_password }}
@@ -0,0 +1,49 @@
1
+ name: Python Tests
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ format:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v4
10
+ - name: Install uv
11
+ uses: astral-sh/setup-uv@v5
12
+ - name: Set up Python 3.11
13
+ uses: actions/setup-python@v5
14
+ with:
15
+ python-version: 3.11
16
+ - name: Install dependencies
17
+ run: uv pip install --system tox
18
+ - name: Validate formatting
19
+ run: uv run tox -e format
20
+
21
+ test:
22
+ runs-on: ubuntu-latest
23
+ strategy:
24
+ max-parallel: 4
25
+ matrix:
26
+ tox_env:
27
+ - py311-dj42-wt60
28
+ - py311-dj42-wt62
29
+ - py311-dj42-wt64
30
+ include:
31
+ - python-version: "3.11"
32
+ tox_env: py311-dj42-wt60
33
+ - python-version: "3.11"
34
+ tox_env: py311-dj42-wt62
35
+ - python-version: "3.11"
36
+ tox_env: py311-dj42-wt64
37
+
38
+ steps:
39
+ - uses: actions/checkout@v4
40
+ - name: Install uv
41
+ uses: astral-sh/setup-uv@v5
42
+ - name: Set up Python ${{ matrix.python-version }}
43
+ uses: actions/setup-python@v5
44
+ with:
45
+ python-version: ${{ matrix.python-version }}
46
+ - name: Install dependencies
47
+ run: uv pip install --system tox tox-gh-actions
48
+ - name: Test with tox
49
+ run: uv run tox -e ${{ matrix.tox_env }} -- --index-url=https://pypi.python.org/simple/
@@ -0,0 +1,18 @@
1
+ .cache
2
+ .coverage
3
+ .DS_Store
4
+ .idea
5
+ .postgres
6
+ .python-version
7
+ .tox
8
+ .coverage.*
9
+ .venv
10
+ **__pycache__**
11
+ *.pyc
12
+ /dist/
13
+ /docs/_build/
14
+ /htmlcov/
15
+ /node_modules/
16
+ /wagtailstreamforms.egg-info/
17
+ /build
18
+ file*.mp4
@@ -0,0 +1,16 @@
1
+ # File format: https://pre-commit.com/#plugins
2
+ # Supported hooks: https://pre-commit.com/hooks.html
3
+ # Running "make format" fixes most issues for you
4
+ repos:
5
+ - repo: https://github.com/charliermarsh/ruff-pre-commit
6
+ # Ruff version.
7
+ rev: "v0.11.0"
8
+ hooks:
9
+ - id: ruff
10
+ - id: ruff-format
11
+ - repo: https://github.com/pre-commit/pre-commit-hooks
12
+ rev: v5.0.0
13
+ hooks:
14
+ - id: check-merge-conflict
15
+ - id: debug-statements
16
+ - id: trailing-whitespace
@@ -0,0 +1,262 @@
1
+ *********
2
+ Changelog
3
+ *********
4
+
5
+ 4.0.3
6
+ -----
7
+ * no BigAutoField in tests
8
+ * add missing migrations; fail when migrations are incomplete
9
+
10
+ 4.0.2
11
+ -----
12
+ * pass use_json_field to StreamField initializer
13
+
14
+ 4.0.1
15
+ -----
16
+ * cleanup non-pep version hack
17
+ * cleanup test matrix in workflow
18
+ * only support wagtail>=4.1
19
+
20
+ 3.22
21
+ ----
22
+ * Add Wagtail 4.2 support
23
+ * Add Django 4.1 support
24
+ * Fix issue with FormChooserBlock
25
+
26
+ 3.21.0
27
+ ------
28
+ * Add Wagtail 4.1 support
29
+ * Update Wagtail menu icon
30
+ * Add nightly test against Wagtail main branch
31
+ * feat: show the form reference field in the list view and export
32
+ * Update Dutch translations
33
+
34
+ 3.20.1
35
+ ------
36
+ * Remove CircleCI from package
37
+
38
+ 3.20.0
39
+ ------
40
+ * Wagtail 3.0 and 4.0 support
41
+
42
+ 3.19.1
43
+ ------
44
+ * Update get_options method for CheckboxesField, RadioField, MultiSelectField and DropdownField
45
+
46
+ 3.19.0
47
+ ------
48
+ * Django 4.0 support
49
+
50
+ 3.18.1
51
+ ------
52
+ * Dropped Django 2.X 3.0 and 3.1 support
53
+ * Dropped Python 3.6 support
54
+ * Dropped Wagtail 2.2 > 2.14 support
55
+
56
+ 3.18.0
57
+ ------
58
+ * Wagtail 2.16 support
59
+
60
+ 3.17.0
61
+ ------
62
+ * Wagtail 2.15 support
63
+
64
+ 3.16.3
65
+ ------
66
+ * Republish do to pypi issue
67
+
68
+ 3.16.2
69
+ ------
70
+ * Republish do to formatting issue
71
+
72
+ 3.16.1
73
+ ------
74
+ * Apply black and isort
75
+
76
+ 3.16.0
77
+ ------
78
+ * Wagtail 2.14 support
79
+
80
+ 3.15.0
81
+ ------
82
+ * Wagtail 2.13 support
83
+
84
+ 3.14.0
85
+ ------
86
+ * Wagtail 2.12 support
87
+
88
+ 3.13.0
89
+ ------
90
+ * Wagtail 2.11 support
91
+ * Dropped Django 2.0 and 2.1 support
92
+
93
+ 3.12.0
94
+ ------
95
+ * Allow fields classes to more easily control the name, label and other values used for form fields
96
+
97
+ 3.11.0
98
+ ------
99
+ * Django 3.0 support
100
+ * Wagtail 2.10 support
101
+
102
+ 3.10.0
103
+ ------
104
+ * Wagtail 2.9 support
105
+
106
+ 3.9.0
107
+ -----
108
+ * Removed 'multiselect' form field
109
+ * Wagtail 2.8 support
110
+ * Dropped Wagtail 2.0 and 2.1 support
111
+ * Integrated with GitHub actions
112
+
113
+ 3.8.0
114
+ -----
115
+ * Wagtail 2.7 Support
116
+
117
+ 3.7.0
118
+ -----
119
+ * Wagtail 2.6 Support
120
+
121
+ 3.6.1
122
+ -----
123
+ * Republish do to pypi issue
124
+
125
+ 3.6.0
126
+ -----
127
+ * Wagtail 2.5 Support
128
+
129
+ 3.5.0
130
+ -----
131
+ * Wagtail 2.4 Support
132
+ * Tweak docs to ensure files work in js example (Thanks Aimee Hendrycks)
133
+
134
+ 3.4.0
135
+ -----
136
+ * Support for Wagtail 2.3
137
+
138
+ 3.3.0
139
+ -----
140
+ * fix issue with saving a submission with a file attached on disk.
141
+ * added new setting ``WAGTAILSTREAMFORM_ENABLE_BUILTIN_HOOKS`` default ``True`` to allow the inbuilt form processing hooks to be disabled.
142
+
143
+ 3.2.0
144
+ -----
145
+ * fix template that inherited from wagtailforms to wagtailadmin
146
+
147
+ 3.1.0
148
+ -----
149
+ * Support for Wagtail 2.2
150
+
151
+ 3.0.0
152
+ -----
153
+ Version 3 is a major re-write and direction change and therefor any version prior
154
+ to this needs to be removed in its entirety first.
155
+
156
+ Whats New:
157
+
158
+ * Update to Wagtail 2.1
159
+ * The concept of creating a custom form class to add functionality has been removed.
160
+ * Along with the concept of custom form submission classes.
161
+ * Fields are now added via a StreamField and you can define your own like ReCAPTCHA or RegexFields.
162
+ * You can easily overwrite fields to add things like widget attributes.
163
+ * You can define a model that will allow you to save additional settings for each form.
164
+ * The form submission is processed via hooks instead of baked into the models.
165
+ * You can create as many form submission hooks as you like to process, email etc the data as you wish. These will be available to all forms that you can enable/disable at will.
166
+ * Files can now be uploaded and are stored along with the submission using the default storage.
167
+ * There is a management command to easily remove old submission data.
168
+
169
+ 2.1.2
170
+ -----
171
+ * Added wagtail framework classifier
172
+
173
+ 2.1.1
174
+ -----
175
+ * Fixed another migration issue
176
+
177
+ 2.1.0
178
+ -----
179
+ * Update to Wagtail 2.1
180
+
181
+ 2.0.1
182
+ -----
183
+ * Fixed migration issue #70
184
+
185
+ 2.0.0
186
+ -----
187
+ * Added support for wagtail 2.
188
+
189
+ 1.6.3
190
+ -----
191
+ * Fix issue where js was not in final package
192
+
193
+ 1.6.2
194
+ -----
195
+ * Added javascript to auto populate the form slug from the name
196
+
197
+ 1.6.1
198
+ -----
199
+ * Small tidy up in form code
200
+
201
+ 1.6.0
202
+ -----
203
+ * Stable Release
204
+
205
+ 1.5.2
206
+ -----
207
+ * Added ``AbstractEmailForm`` to more easily allow creating additional form types.
208
+
209
+ 1.5.1
210
+ -----
211
+ * Fix migrations being regenerated when template choices change
212
+
213
+ 1.5.0
214
+ -----
215
+ * Removed all project dependencies except wagtail and recapcha
216
+ * The urls no longer need to be specified in your ``urls.py`` and can be removed.
217
+
218
+ 1.4.4
219
+ -----
220
+ * The template tag now has the full page context incase u need a reference to the user or page
221
+
222
+ 1.4.3
223
+ -----
224
+ * Fixed bug where messages are not available in the template tags context
225
+
226
+ 1.4.2
227
+ -----
228
+ * Removed label value from recapcha field
229
+ * Added setting to set order of menu item in cms admin
230
+
231
+ 1.4.1
232
+ -----
233
+ * Added an optional error message to display if the forms have errors
234
+
235
+ 1.4.0
236
+ -----
237
+ * Added a template tag that can be used to render a form. Incase you want it to appear outside a streamfield
238
+
239
+ 1.3.0
240
+ -----
241
+ * A form and it's fields can easily be copied to a new form from within the admin area
242
+
243
+ 1.2.3
244
+ -----
245
+ * Fix paginator on submission list not remembering date filters
246
+
247
+ 1.2.2
248
+ -----
249
+ * Form submission viewing and deleting permissions have been implemented
250
+
251
+ 1.2.1
252
+ -----
253
+ * On the event that a form is deleted that is still referenced in a streamfield, we are rendering a generic template that can be overridden to warn the end user
254
+
255
+ 1.2.0
256
+ -----
257
+ * In the form builder you can now specify a page to redirect to upon successful submission of the form
258
+ * The page mixin StreamFormPageMixin that needed to be included in every page has now been replaced by a wagtail before_serve_page hook so you will need to remove this mixin
259
+
260
+ 1.1.1
261
+ -----
262
+ * Fixed bug where multiple forms of same type in a streamfield were both showing validation errors when one submitted
@@ -0,0 +1,36 @@
1
+ FROM python:3.13-slim-bookworm
2
+ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
3
+
4
+ # Copy the application code to the container:
5
+ RUN mkdir /code/
6
+ WORKDIR /code/
7
+ ADD . /code/
8
+
9
+ # Install all build deps:
10
+ RUN set -ex \
11
+ && apt-get update \
12
+ && apt-get install -y --no-install-recommends \
13
+ gcc \
14
+ gettext \
15
+ libjpeg-dev \
16
+ libpq-dev \
17
+ make \
18
+ postgresql-client \
19
+ || (cat /var/log/apt/term.log || true) \
20
+ && apt-get clean \
21
+ && rm -rf /var/lib/apt/lists/*
22
+
23
+ RUN uv sync --frozen
24
+
25
+ # expose port
26
+ EXPOSE 8000
27
+
28
+ # Docker entrypoint:
29
+ ENV DJANGO_MANAGEPY_MIGRATE=on \
30
+ DJANGO_MANAGEPY_COLLECTSTATIC=on \
31
+ DJANGO_MANAGEPY_UPDATEINDEX=on
32
+
33
+ ENTRYPOINT ["/code/docker-entrypoint.sh"]
34
+
35
+ # Start python runserver:
36
+ CMD ["uv", "run", "python", "manage.py", "runserver", "0.0.0.0:8000"]
@@ -0,0 +1,19 @@
1
+ Copyright (C) 2018 Accent Design Group LTD
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ this software and associated documentation files (the "Software"), to deal in
5
+ the Software without restriction, including without limitation the rights to
6
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7
+ of the Software, and to permit persons to whom the Software is furnished to do
8
+ so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ include LICENSE
2
+ recursive-include wagtailstreamforms *.py *.html *.js *.mo *.po
@@ -0,0 +1,31 @@
1
+ .PHONY: install test upload docs
2
+
3
+
4
+ install:
5
+ pip install -e .[docs,test]
6
+
7
+ test:
8
+ DJANGO_SETTINGS_MODULE=tests.settings ./manage.py test
9
+
10
+ retest:
11
+ py.test --nomigrations --reuse-db --lf --ignore=tests/functional tests/
12
+
13
+ docs:
14
+ $(MAKE) -C docs html
15
+
16
+ format:
17
+ ruff check --fix --select I wagtailstreamforms/ tests/
18
+ ruff format wagtailstreamforms/ tests/
19
+
20
+ #
21
+ # Utility
22
+ makemessages:
23
+ ./manage.py makemessages -all
24
+
25
+ compilemessages:
26
+ ./manage.py compilemessages
27
+
28
+ release:
29
+ rm -rf dist/*
30
+ python setup.py sdist bdist_wheel
31
+ twine upload dist/*
@@ -0,0 +1,24 @@
1
+ Metadata-Version: 2.4
2
+ Name: wagtailstreamforms
3
+ Version: 0.0.0
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/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: wagtail<7.0,>=4.1
18
+ Requires-Dist: Unidecode<2.0,>=0.04.14
19
+ Requires-Dist: wagtail-generic-chooser<0.7,>=0.5.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