django-dynamic-admin-forms 3.2.4__tar.gz → 3.2.5__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 (55) hide show
  1. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/.ambient-package-update/metadata.py +1 -0
  2. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/.github/workflows/ci.yml +4 -3
  3. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/.pre-commit-config.yaml +17 -6
  4. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/CHANGES.md +6 -0
  5. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/PKG-INFO +11 -10
  6. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/README.md +2 -2
  7. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/django_dynamic_admin_forms/__init__.py +1 -1
  8. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/django_dynamic_admin_forms/templates/admin/change_form.html +37 -37
  9. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/pyproject.toml +9 -7
  10. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/scripts/unix/publish_to_pypi.sh +1 -1
  11. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/scripts/windows/publish_to_pypi.ps1 +1 -1
  12. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/.ambient-package-update/templates/snippets/content.tpl +0 -0
  13. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/.ambient-package-update/templates/snippets/installation.tpl +0 -0
  14. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/.editorconfig +0 -0
  15. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/.gitignore +0 -0
  16. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/.python-version +0 -0
  17. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/.readthedocs.yaml +0 -0
  18. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/LICENSE.md +0 -0
  19. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/MANIFEST.in +0 -0
  20. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/SECURITY.md +0 -0
  21. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/django_dynamic_admin_forms/admin.py +0 -0
  22. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/django_dynamic_admin_forms/apps.py +0 -0
  23. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/django_dynamic_admin_forms/static/js/dynamic_admin.js +0 -0
  24. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/django_dynamic_admin_forms/urls.py +0 -0
  25. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/docs/Makefile +0 -0
  26. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/docs/conf.py +0 -0
  27. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/docs/demo.gif +0 -0
  28. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/docs/features/changelog.rst +0 -0
  29. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/docs/index.rst +0 -0
  30. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/docs/make.bat +0 -0
  31. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/e2e/cypress/integration/dynamic-select.spec.js +0 -0
  32. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/e2e/cypress/plugins/index.js +0 -0
  33. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/e2e/cypress/support/commands.js +0 -0
  34. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/e2e/cypress/support/index.js +0 -0
  35. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/e2e/cypress/support/paths.js +0 -0
  36. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/e2e/cypress.json +0 -0
  37. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/e2e/package.json +0 -0
  38. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/e2e/yarn.lock +0 -0
  39. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/fixtures/fixtures-dev.json +0 -0
  40. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/manage.py +0 -0
  41. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/scripts/unix/install_requirements.sh +0 -0
  42. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/scripts/windows/install_requirements.ps1 +0 -0
  43. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/settings.py +0 -0
  44. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/testapp/__init__.py +0 -0
  45. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/testapp/admin.py +0 -0
  46. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/testapp/apps.py +0 -0
  47. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/testapp/migrations/0001_initial.py +0 -0
  48. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/testapp/migrations/0002_extend_example.py +0 -0
  49. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/testapp/migrations/0003_example_file_field.py +0 -0
  50. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/testapp/migrations/__init__.py +0 -0
  51. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/testapp/models.py +0 -0
  52. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/testapp/urls.py +0 -0
  53. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/tests/__init__.py +0 -0
  54. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/tests/test_admin_generic.py +0 -0
  55. {django_dynamic_admin_forms-3.2.4 → django_dynamic_admin_forms-3.2.5}/tests/test_admin_unit.py +0 -0
@@ -28,6 +28,7 @@ METADATA = PackageMetadata(
28
28
  license_year=2022,
29
29
  development_status="5 - Production/Stable",
30
30
  has_migrations=False,
31
+ main_branch="main",
31
32
  readme_content=ReadmeContent(
32
33
  tagline="Add simple interactions to the otherwise static django admin.",
33
34
  ),
@@ -2,7 +2,8 @@ name: Unit tests
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ '**' ]
5
+ branches:
6
+ - main
6
7
  pull_request:
7
8
 
8
9
  jobs:
@@ -21,14 +22,14 @@ jobs:
21
22
 
22
23
  - name: Run pre-commit hooks
23
24
  run: pre-commit run --all-files --hook-stage push
24
-
25
+
25
26
 
26
27
  tests:
27
28
  name: Python ${{ matrix.python-version }}, django ${{ matrix.django-version }}
28
29
  runs-on: ubuntu-22.04
29
30
  strategy:
30
31
  matrix:
31
- python-version: ['3.9', '3.10', '3.11', '3.12', ]
32
+ python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', ]
32
33
  django-version: ['42', '50', '51', ]
33
34
 
34
35
  exclude:
@@ -3,7 +3,7 @@
3
3
 
4
4
  repos:
5
5
  - repo: https://github.com/astral-sh/ruff-pre-commit
6
- rev: v0.6.4
6
+ rev: v0.6.9
7
7
  hooks:
8
8
  # Run the Ruff linter.
9
9
  - id: ruff
@@ -12,7 +12,7 @@ repos:
12
12
  - id: ruff-format
13
13
 
14
14
  - repo: https://github.com/adamchainz/blacken-docs
15
- rev: 1.18.0
15
+ rev: 1.19.0
16
16
  hooks:
17
17
  - id: blacken-docs
18
18
  additional_dependencies:
@@ -20,15 +20,26 @@ repos:
20
20
  files: '(?:README\.md|docs\/.*\.(?:md|rst))'
21
21
 
22
22
  - repo: https://github.com/asottile/pyupgrade
23
- rev: v3.17.0
23
+ rev: v3.18.0
24
24
  hooks:
25
25
  - id: pyupgrade
26
26
  args: [ --py39-plus ]
27
- stages: [ push ]
27
+ stages: [ pre-push ]
28
28
 
29
29
  - repo: https://github.com/adamchainz/django-upgrade
30
- rev: 1.21.0
30
+ rev: 1.22.1
31
31
  hooks:
32
32
  - id: django-upgrade
33
33
  args: [--target-version, "4.2"]
34
- stages: [ push ]
34
+ stages: [ pre-push ]
35
+
36
+ - repo: https://github.com/adamchainz/djade-pre-commit
37
+ rev: 1.3.0
38
+ hooks:
39
+ - id: djade
40
+ args: [--target-version, "4.2"]
41
+ exclude: |
42
+ (?x)^(
43
+ charts/.*
44
+ |.*\.py
45
+ )$
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ * *3.2.5* (2024-10-14)
4
+ * Added Python 3.13 support
5
+ * Added Djade linter to pre-commit
6
+ * Improved GitHub action triggers
7
+ * Updated dev dependencies and linters
8
+
3
9
  * *3.2.4* (2024-09-11)
4
10
  * Added GitHub action trigger for PRs
5
11
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-dynamic-admin-forms
3
- Version: 3.2.4
3
+ Version: 3.2.5
4
4
  Summary: Add simple dynamic interaction to the otherwise static django admin.
5
5
  Author-email: Ambient Digital <hello@ambient.digital>, Fabian Binz <fabian.binz@ambient.digital>
6
6
  Description-Content-Type: text/markdown
@@ -20,21 +20,22 @@ Classifier: Programming Language :: Python :: 3.9
20
20
  Classifier: Programming Language :: Python :: 3.10
21
21
  Classifier: Programming Language :: Python :: 3.11
22
22
  Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
23
24
  Classifier: Topic :: Utilities
24
25
  Requires-Dist: Django>=4.2
25
- Requires-Dist: typer~=0.9 ; extra == "dev"
26
- Requires-Dist: freezegun~=1.3 ; extra == "dev"
27
- Requires-Dist: pytest-django~=4.7 ; extra == "dev"
28
- Requires-Dist: pytest-mock~=3.12 ; extra == "dev"
26
+ Requires-Dist: typer~=0.12 ; extra == "dev"
27
+ Requires-Dist: freezegun~=1.5 ; extra == "dev"
28
+ Requires-Dist: pytest-django~=4.9 ; extra == "dev"
29
+ Requires-Dist: pytest-mock~=3.14 ; extra == "dev"
29
30
  Requires-Dist: coverage~=7.6 ; extra == "dev"
30
- Requires-Dist: pre-commit~=3.7 ; extra == "dev"
31
- Requires-Dist: ruff~=0.4 ; extra == "dev"
31
+ Requires-Dist: pre-commit~=4.0 ; extra == "dev"
32
+ Requires-Dist: ruff~=0.6 ; extra == "dev"
32
33
  Requires-Dist: sphinx~=7.1 ; extra == "dev"
33
34
  Requires-Dist: sphinx-rtd-theme~=2.0 ; extra == "dev"
34
35
  Requires-Dist: m2r2==0.3.3.post2 ; extra == "dev"
35
36
  Requires-Dist: mistune<2.0.0 ; extra == "dev"
36
37
  Requires-Dist: flit~=3.9 ; extra == "dev"
37
- Requires-Dist: keyring~=25.2 ; extra == "dev"
38
+ Requires-Dist: keyring~=25.4 ; extra == "dev"
38
39
  Requires-Dist: ambient-package-update ; extra == "dev"
39
40
  Requires-Dist: unittest-parametrize~=1.4 ; extra == "dev"
40
41
  Project-URL: Bugtracker, https://github.com/ambient-innovation/django-dynamic-admin/issues
@@ -275,7 +276,7 @@ Example: run all hooks of pre-push stage
275
276
 
276
277
  ### Update documentation
277
278
 
278
- - To build the documentation run: `sphinx-build docs/ docs/_build/html/`.
279
+ - To build the documentation, run: `sphinx-build docs/ docs/_build/html/`.
279
280
  - Open `docs/_build/html/index.html` to see the documentation.
280
281
 
281
282
 
@@ -311,7 +312,7 @@ How to compile translation files:
311
312
 
312
313
  - Increment version in main `__init__.py`
313
314
 
314
- - Create pull request / merge to master
315
+ - Create pull request / merge to main
315
316
 
316
317
  - This project uses the flit package to publish to PyPI. Thus publishing should be as easy as running:
317
318
  ```
@@ -229,7 +229,7 @@ Example: run all hooks of pre-push stage
229
229
 
230
230
  ### Update documentation
231
231
 
232
- - To build the documentation run: `sphinx-build docs/ docs/_build/html/`.
232
+ - To build the documentation, run: `sphinx-build docs/ docs/_build/html/`.
233
233
  - Open `docs/_build/html/index.html` to see the documentation.
234
234
 
235
235
 
@@ -265,7 +265,7 @@ How to compile translation files:
265
265
 
266
266
  - Increment version in main `__init__.py`
267
267
 
268
- - Create pull request / merge to master
268
+ - Create pull request / merge to main
269
269
 
270
270
  - This project uses the flit package to publish to PyPI. Thus publishing should be as easy as running:
271
271
  ```
@@ -1,3 +1,3 @@
1
1
  """Add simple dynamic interaction to the otherwise static django admin."""
2
2
 
3
- __version__ = "3.2.4"
3
+ __version__ = "3.2.5"
@@ -1,37 +1,37 @@
1
- {% extends "admin/change_form.html" %}
2
- {% load static %}
3
-
4
- {% block admin_change_form_document_ready %}
5
- {{ block.super }}
6
- <script type="text/javascript" src="{% static 'js/dynamic_admin.js' %}"></script>
7
-
8
- {{ adminform.model_admin.dynamic_select_fields|json_script:"dynamic_select_fields" }}
9
- {{ adminform.model_admin.dynamic_input_fields|json_script:"dynamic_input_fields" }}
10
-
11
- <script type="text/javascript">
12
- var dynamic_select_fields = JSON.parse(document.getElementById('dynamic_select_fields').textContent);
13
- var dynamic_input_fields = JSON.parse(document.getElementById('dynamic_input_fields').textContent);
14
- DynamicAdmin.dynamicWidgets("{{ opts.app_label }}", "{{ opts.model_name }}", dynamic_select_fields, dynamic_input_fields);
15
- </script>
16
- {% endblock %}
17
-
18
- {# Jazzmin-Support: the extrajs block is added in the jazzmin admin templates and won't do any harm for normal django admin#}
19
- {% block extrajs %}
20
- {{ block.super }}
21
- <script>
22
- // Find all select2 instances in the current change form and trigger the change event manually
23
- // whenever the select2 instance changes it's value.
24
- $(function() {
25
- $('.select2-hidden-accessible').each(function (i, select) {
26
- var $select = $(select);
27
- $select.on('change', function(event) {
28
- var form = $(event.target).closest('form')[0];
29
- // for some reason, jQuery's .trigger() method doesn't seem to work here, so we trigger a change event manually
30
- if (form) {
31
- form.dispatchEvent(new Event("change"));
32
- }
33
- })
34
- })
35
- });
36
- </script>
37
- {% endblock %}
1
+ {% extends "admin/change_form.html" %}
2
+ {% load static %}
3
+
4
+ {% block admin_change_form_document_ready %}
5
+ {{ block.super }}
6
+ <script type="text/javascript" src="{% static 'js/dynamic_admin.js' %}"></script>
7
+
8
+ {{ adminform.model_admin.dynamic_select_fields|json_script:"dynamic_select_fields" }}
9
+ {{ adminform.model_admin.dynamic_input_fields|json_script:"dynamic_input_fields" }}
10
+
11
+ <script type="text/javascript">
12
+ var dynamic_select_fields = JSON.parse(document.getElementById('dynamic_select_fields').textContent);
13
+ var dynamic_input_fields = JSON.parse(document.getElementById('dynamic_input_fields').textContent);
14
+ DynamicAdmin.dynamicWidgets("{{ opts.app_label }}", "{{ opts.model_name }}", dynamic_select_fields, dynamic_input_fields);
15
+ </script>
16
+ {% endblock admin_change_form_document_ready %}
17
+
18
+ {# Jazzmin-Support: the extrajs block is added in the jazzmin admin templates and won't do any harm for normal django admin #}
19
+ {% block extrajs %}
20
+ {{ block.super }}
21
+ <script>
22
+ // Find all select2 instances in the current change form and trigger the change event manually
23
+ // whenever the select2 instance changes it's value.
24
+ $(function() {
25
+ $('.select2-hidden-accessible').each(function (i, select) {
26
+ var $select = $(select);
27
+ $select.on('change', function(event) {
28
+ var form = $(event.target).closest('form')[0];
29
+ // for some reason, jQuery's .trigger() method doesn't seem to work here, so we trigger a change event manually
30
+ if (form) {
31
+ form.dispatchEvent(new Event("change"));
32
+ }
33
+ })
34
+ })
35
+ });
36
+ </script>
37
+ {% endblock extrajs %}
@@ -26,6 +26,7 @@ classifiers = [
26
26
  "Programming Language :: Python :: 3.10",
27
27
  "Programming Language :: Python :: 3.11",
28
28
  "Programming Language :: Python :: 3.12",
29
+ "Programming Language :: Python :: 3.13",
29
30
  "Topic :: Utilities",
30
31
  ]
31
32
  dynamic = ["version", "description"]
@@ -37,19 +38,19 @@ dependencies = [
37
38
 
38
39
  [project.optional-dependencies]
39
40
  dev = [
40
- 'typer~=0.9',
41
- 'freezegun~=1.3',
42
- 'pytest-django~=4.7',
43
- 'pytest-mock~=3.12',
41
+ 'typer~=0.12',
42
+ 'freezegun~=1.5',
43
+ 'pytest-django~=4.9',
44
+ 'pytest-mock~=3.14',
44
45
  'coverage~=7.6',
45
- 'pre-commit~=3.7',
46
- 'ruff~=0.4',
46
+ 'pre-commit~=4.0',
47
+ 'ruff~=0.6',
47
48
  'sphinx~=7.1',
48
49
  'sphinx-rtd-theme~=2.0',
49
50
  'm2r2==0.3.3.post2',
50
51
  'mistune<2.0.0',
51
52
  'flit~=3.9',
52
- 'keyring~=25.2',
53
+ 'keyring~=25.4',
53
54
  'ambient-package-update',
54
55
  'unittest-parametrize~=1.4',
55
56
  ]
@@ -191,6 +192,7 @@ python =
191
192
  3.10: py310
192
193
  3.11: py311
193
194
  3.12: py312
195
+ 3.13: py313
194
196
  """
195
197
 
196
198
  [tool.pytest.ini_options]
@@ -1,2 +1,2 @@
1
1
  flit publish --repository testpypi
2
- flit publish
2
+ flit publish
@@ -1,2 +1,2 @@
1
1
  flit publish --repository testpypi
2
- flit publish
2
+ flit publish