django-dynamic-admin-forms 2.2.1__tar.gz → 3.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 (55) hide show
  1. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/.ambient-package-update/metadata.py +1 -1
  2. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/.github/workflows/ci.yml +4 -4
  3. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/.gitignore +72 -72
  4. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/.pre-commit-config.yaml +4 -4
  5. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/CHANGES.md +4 -0
  6. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/PKG-INFO +9 -11
  7. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/README.md +4 -4
  8. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/django_dynamic_admin_forms/__init__.py +1 -1
  9. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/django_dynamic_admin_forms/urls.py +8 -8
  10. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/docs/conf.py +1 -1
  11. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/manage.py +23 -22
  12. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/pyproject.toml +15 -12
  13. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/settings.py +86 -86
  14. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/testapp/urls.py +23 -22
  15. django_dynamic_admin_forms-2.2.1/pytest.init +0 -2
  16. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/.coveragerc +0 -0
  17. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/.editorconfig +0 -0
  18. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/.python-version +0 -0
  19. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/.readthedocs.yaml +0 -0
  20. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/LICENSE.md +0 -0
  21. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/MANIFEST.in +0 -0
  22. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/django_dynamic_admin_forms/admin.py +0 -0
  23. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/django_dynamic_admin_forms/apps.py +0 -0
  24. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/django_dynamic_admin_forms/static/js/dynamic_admin.js +0 -0
  25. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/django_dynamic_admin_forms/templates/admin/change_form.html +0 -0
  26. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/docs/Makefile +0 -0
  27. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/docs/demo.gif +0 -0
  28. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/docs/features/changelog.rst +0 -0
  29. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/docs/index.rst +0 -0
  30. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/docs/make.bat +0 -0
  31. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/e2e/cypress/integration/dynamic-select.spec.js +0 -0
  32. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/e2e/cypress/plugins/index.js +0 -0
  33. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/e2e/cypress/support/commands.js +0 -0
  34. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/e2e/cypress/support/index.js +0 -0
  35. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/e2e/cypress/support/paths.js +0 -0
  36. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/e2e/cypress.json +0 -0
  37. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/e2e/package.json +0 -0
  38. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/e2e/yarn.lock +0 -0
  39. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/fixtures/fixtures-dev.json +0 -0
  40. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/scripts/unix/install_requirements.sh +0 -0
  41. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/scripts/unix/publish_to_pypi.sh +0 -0
  42. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/scripts/windows/install_requirements.ps1 +0 -0
  43. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/scripts/windows/publish_to_pypi.ps1 +0 -0
  44. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/setup.cfg +0 -0
  45. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/testapp/__init__.py +0 -0
  46. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/testapp/admin.py +0 -0
  47. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/testapp/apps.py +0 -0
  48. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/testapp/migrations/0001_initial.py +0 -0
  49. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/testapp/migrations/0002_extend_example.py +0 -0
  50. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/testapp/migrations/0003_example_file_field.py +0 -0
  51. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/testapp/migrations/__init__.py +0 -0
  52. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/testapp/models.py +0 -0
  53. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/tests/__init__.py +0 -0
  54. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/tests/test_admin_generic.py +0 -0
  55. {django_dynamic_admin_forms-2.2.1 → django_dynamic_admin_forms-3.0.0}/tests/test_admin_unit.py +0 -0
@@ -139,7 +139,7 @@ $ flit install --symlink
139
139
  Now the package should be available in your virtual environment
140
140
  and any changes should be directly visible.
141
141
 
142
- Alternatively, simply copy the directory `dynamic_admin_forms`
142
+ Alternatively, copy the directory `dynamic_admin_forms`
143
143
  into any normal django project, so that the python interpreter
144
144
  finds the local version instead of the installed (old) version.
145
145
 
@@ -11,7 +11,7 @@ jobs:
11
11
  - uses: actions/checkout@v4
12
12
 
13
13
  - name: Set up Python 3.12
14
- uses: actions/setup-python@v4
14
+ uses: actions/setup-python@v5
15
15
  with:
16
16
  python-version: "3.12"
17
17
 
@@ -28,7 +28,7 @@ jobs:
28
28
  strategy:
29
29
  matrix:
30
30
  python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', ]
31
- django-version: ['32', '41', '42', '50', ]
31
+ django-version: ['42', '50', ]
32
32
 
33
33
  exclude:
34
34
  - python-version: '3.12'
@@ -45,7 +45,7 @@ jobs:
45
45
  steps:
46
46
  - uses: actions/checkout@v4
47
47
  - name: setup python
48
- uses: actions/setup-python@v4
48
+ uses: actions/setup-python@v5
49
49
  with:
50
50
  python-version: ${{ matrix.python-version }}
51
51
  - name: Install tox
@@ -67,7 +67,7 @@ jobs:
67
67
  steps:
68
68
  - uses: actions/checkout@v4
69
69
 
70
- - uses: actions/setup-python@v4
70
+ - uses: actions/setup-python@v5
71
71
  with:
72
72
  python-version: '3.12'
73
73
 
@@ -1,72 +1,72 @@
1
- # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
-
3
- # dependencies
4
- /node_modules
5
- /.pnp
6
- .pnp.js
7
-
8
- # Visual Studio Code
9
- .vscode/
10
-
11
- # JetBrains
12
- .idea/
13
-
14
- # SublimeText
15
- *.tmlanguage.cache
16
- *.tmPreferences.cache
17
- *.stTheme.cache
18
- *.sublime-workspace
19
-
20
- # OSX
21
- .DS_Store
22
- .AppleDouble
23
- .LSOverride
24
-
25
- # Basics
26
- __pycache__
27
- *.pid
28
- *.db
29
- .env
30
- .venv
31
-
32
- # NPM / Yarn
33
- node_modules/
34
- npm-debug.log*
35
- yarn-debug.log*
36
- yarn-error.log*
37
- package-lock.json
38
-
39
- # Celery
40
- celerybeat-schedule
41
- backend/celerybeat.pid
42
-
43
- # Logs
44
- *.log
45
- pip-log.txt
46
-
47
- # Unit test / coverage reports
48
- .coverage
49
- .tox
50
- builds
51
- htmlcov
52
- test-reports
53
-
54
- # Translations
55
- *.mo
56
- *.pot
57
-
58
- # Media dir and collected statics
59
- backend/media/*
60
- !backend/media/test-data/*
61
- */staticfiles
62
- db.sqlite3
63
-
64
- # Cypress output
65
- */cypress/*
66
-
67
- # Build output
68
- dist
69
- _build
70
-
71
- # SCSS
72
- .sass-cache/
1
+ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
+
3
+ # dependencies
4
+ /node_modules
5
+ /.pnp
6
+ .pnp.js
7
+
8
+ # Visual Studio Code
9
+ .vscode/
10
+
11
+ # JetBrains
12
+ .idea/
13
+
14
+ # SublimeText
15
+ *.tmlanguage.cache
16
+ *.tmPreferences.cache
17
+ *.stTheme.cache
18
+ *.sublime-workspace
19
+
20
+ # OSX
21
+ .DS_Store
22
+ .AppleDouble
23
+ .LSOverride
24
+
25
+ # Basics
26
+ __pycache__
27
+ *.pid
28
+ *.db
29
+ .env
30
+ .venv
31
+
32
+ # NPM / Yarn
33
+ node_modules/
34
+ npm-debug.log*
35
+ yarn-debug.log*
36
+ yarn-error.log*
37
+ package-lock.json
38
+
39
+ # Celery
40
+ celerybeat-schedule
41
+ backend/celerybeat.pid
42
+
43
+ # Logs
44
+ *.log
45
+ pip-log.txt
46
+
47
+ # Unit test / coverage reports
48
+ .coverage
49
+ .tox
50
+ builds
51
+ htmlcov
52
+ test-reports
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Media dir and collected statics
59
+ backend/media/*
60
+ !backend/media/test-data/*
61
+ */staticfiles
62
+ db.sqlite3
63
+
64
+ # Cypress output
65
+ */cypress/*
66
+
67
+ # Build output
68
+ dist
69
+ _build
70
+
71
+ # SCSS
72
+ .sass-cache/
@@ -3,7 +3,7 @@
3
3
 
4
4
  repos:
5
5
  - repo: https://github.com/astral-sh/ruff-pre-commit
6
- rev: v0.1.6
6
+ rev: v0.3.5
7
7
  hooks:
8
8
  # Run the Ruff linter.
9
9
  - id: ruff
@@ -12,15 +12,15 @@ repos:
12
12
  - id: ruff-format
13
13
 
14
14
  - repo: https://github.com/asottile/pyupgrade
15
- rev: v3.15.0
15
+ rev: v3.15.2
16
16
  hooks:
17
17
  - id: pyupgrade
18
18
  args: [ --py38-plus ]
19
19
  stages: [ push ]
20
20
 
21
21
  - repo: https://github.com/adamchainz/django-upgrade
22
- rev: 1.15.0
22
+ rev: 1.16.0
23
23
  hooks:
24
24
  - id: django-upgrade
25
- args: [--target-version, "3.2"]
25
+ args: [--target-version, "4.2"]
26
26
  stages: [ push ]
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ **3.0.0**
4
+ * Dropped Django 3.2 & 4.1 support (via `ambient-package-update`)
5
+ * Internal updates via `ambient-package-update`
6
+
3
7
  **2.2.1**
4
8
 
5
9
  - Fixed security issue with URL not being wrapped in `admin_view`
@@ -1,14 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-dynamic-admin-forms
3
- Version: 2.2.1
3
+ Version: 3.0.0
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
7
7
  Classifier: Development Status :: 5 - Production/Stable
8
8
  Classifier: Environment :: Web Environment
9
9
  Classifier: Framework :: Django
10
- Classifier: Framework :: Django :: 3.2
11
- Classifier: Framework :: Django :: 4.1
12
10
  Classifier: Framework :: Django :: 4.2
13
11
  Classifier: Framework :: Django :: 5.0
14
12
  Classifier: Intended Audience :: Developers
@@ -31,12 +29,12 @@ Requires-Dist: pytest-mock~=3.12 ; extra == "dev"
31
29
  Requires-Dist: coverage~=7.3 ; extra == "dev"
32
30
  Requires-Dist: pre-commit~=3.5 ; extra == "dev"
33
31
  Requires-Dist: ruff~=0.1.7 ; extra == "dev"
34
- Requires-Dist: sphinx==4.2.0 ; extra == "dev"
35
- Requires-Dist: sphinx-rtd-theme==1.0.0 ; extra == "dev"
36
- Requires-Dist: m2r2==0.3.1 ; extra == "dev"
32
+ Requires-Dist: sphinx~=7.1 ; extra == "dev"
33
+ Requires-Dist: sphinx-rtd-theme~=2.0 ; extra == "dev"
34
+ Requires-Dist: m2r2==0.3.3.post2 ; extra == "dev"
37
35
  Requires-Dist: mistune<2.0.0 ; extra == "dev"
38
36
  Requires-Dist: flit~=3.9 ; extra == "dev"
39
- Requires-Dist: ambient-package-update~=23.12.4 ; extra == "dev"
37
+ Requires-Dist: ambient-package-update~=24.4.4 ; extra == "dev"
40
38
  Requires-Dist: unittest-parametrize~=1.4 ; extra == "dev"
41
39
  Project-URL: Bugtracker, https://github.com/ambient-innovation/django-dynamic-admin/issues
42
40
  Project-URL: Changelog, https://django-dynamic-admin-forms.readthedocs.io/en/latest/features/changelog.html
@@ -163,14 +161,14 @@ outerHTML of the correct HTML elements to update the form.
163
161
  For local development, create a virtual environment
164
162
  in the `testproj` folder:
165
163
  ```shell
166
- $ cd testapp
164
+ $ cd testproj
167
165
  $ python3 -m venv .venv
168
166
  $ source .venv/bin/activate
169
167
  $ cd ..
170
- $ pip install -e .
168
+ $ flit install --symlink
171
169
  ```
172
170
  Now the package should be available in your virtual environment
173
- and any changes should be directly visible. Run the project as a Django server and navigate to the admin page.
171
+ and any changes should be directly visible.
174
172
 
175
173
  Alternatively, copy the directory `dynamic_admin_forms`
176
174
  into any normal django project, so that the python interpreter
@@ -180,7 +178,7 @@ finds the local version instead of the installed (old) version.
180
178
 
181
179
  To run end-to-end tests locally:
182
180
  ```shell
183
- $ cd testapp
181
+ $ cd testproj
184
182
  $ python manage.py runserver 0.0.0.0:8000 & # start server
185
183
  $ python manage.py loaddata fixtures/fixtures-dev.json
186
184
  $ cd ../e2e
@@ -116,14 +116,14 @@ outerHTML of the correct HTML elements to update the form.
116
116
  For local development, create a virtual environment
117
117
  in the `testproj` folder:
118
118
  ```shell
119
- $ cd testapp
119
+ $ cd testproj
120
120
  $ python3 -m venv .venv
121
121
  $ source .venv/bin/activate
122
122
  $ cd ..
123
- $ pip install -e .
123
+ $ flit install --symlink
124
124
  ```
125
125
  Now the package should be available in your virtual environment
126
- and any changes should be directly visible. Run the project as a Django server and navigate to the admin page.
126
+ and any changes should be directly visible.
127
127
 
128
128
  Alternatively, copy the directory `dynamic_admin_forms`
129
129
  into any normal django project, so that the python interpreter
@@ -133,7 +133,7 @@ finds the local version instead of the installed (old) version.
133
133
 
134
134
  To run end-to-end tests locally:
135
135
  ```shell
136
- $ cd testapp
136
+ $ cd testproj
137
137
  $ python manage.py runserver 0.0.0.0:8000 & # start server
138
138
  $ python manage.py loaddata fixtures/fixtures-dev.json
139
139
  $ cd ../e2e
@@ -1,3 +1,3 @@
1
1
  """Add simple dynamic interaction to the otherwise static django admin."""
2
2
 
3
- __version__ = "2.2.1"
3
+ __version__ = "3.0.0"
@@ -1,8 +1,8 @@
1
- from django.contrib import admin
2
- from django.urls import path
3
-
4
- from django_dynamic_admin_forms.admin import DynamicModelAdminMixin
5
-
6
- urlpatterns = [
7
- path("", admin.site.admin_view(DynamicModelAdminMixin.render_field)),
8
- ]
1
+ from django.contrib import admin
2
+ from django.urls import path
3
+
4
+ from django_dynamic_admin_forms.admin import DynamicModelAdminMixin
5
+
6
+ urlpatterns = [
7
+ path("", admin.site.admin_view(DynamicModelAdminMixin.render_field)),
8
+ ]
@@ -36,7 +36,7 @@ from django_dynamic_admin_forms import __version__ # noqa: E402
36
36
  # -- Project information -----------------------------------------------------
37
37
 
38
38
  project = "django-dynamic-admin-forms"
39
- copyright = "2023, Ambient Innovation: GmbH" # noqa: A001
39
+ copyright = "2024, Ambient Innovation: GmbH" # noqa: A001
40
40
  author = "Ambient Innovation: GmbH <hello@ambient.digital>"
41
41
  version = __version__
42
42
  release = __version__
@@ -1,22 +1,23 @@
1
- #!/usr/bin/env python
2
- """Django's command-line utility for administrative tasks."""
3
- import os
4
- import sys
5
-
6
-
7
- def main():
8
- """Run administrative tasks."""
9
- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
10
- try:
11
- from django.core.management import execute_from_command_line
12
- except ImportError as exc:
13
- raise ImportError(
14
- "Couldn't import Django. Are you sure it's installed and "
15
- "available on your PYTHONPATH environment variable? Did you "
16
- "forget to activate a virtual environment?"
17
- ) from exc
18
- execute_from_command_line(sys.argv)
19
-
20
-
21
- if __name__ == "__main__":
22
- main()
1
+ #!/usr/bin/env python
2
+ """Django's command-line utility for administrative tasks."""
3
+
4
+ import os
5
+ import sys
6
+
7
+
8
+ def main():
9
+ """Run administrative tasks."""
10
+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
11
+ try:
12
+ from django.core.management import execute_from_command_line
13
+ except ImportError as exc:
14
+ raise ImportError(
15
+ "Couldn't import Django. Are you sure it's installed and "
16
+ "available on your PYTHONPATH environment variable? Did you "
17
+ "forget to activate a virtual environment?"
18
+ ) from exc
19
+ execute_from_command_line(sys.argv)
20
+
21
+
22
+ if __name__ == "__main__":
23
+ main()
@@ -13,8 +13,6 @@ classifiers = [
13
13
  "Development Status :: 5 - Production/Stable",
14
14
  "Environment :: Web Environment",
15
15
  "Framework :: Django",
16
- "Framework :: Django :: 3.2",
17
- "Framework :: Django :: 4.1",
18
16
  "Framework :: Django :: 4.2",
19
17
  "Framework :: Django :: 5.0",
20
18
  "Intended Audience :: Developers",
@@ -46,12 +44,12 @@ dev = [
46
44
  'coverage~=7.3',
47
45
  'pre-commit~=3.5',
48
46
  'ruff~=0.1.7',
49
- 'sphinx==4.2.0',
50
- 'sphinx-rtd-theme==1.0.0',
51
- 'm2r2==0.3.1',
47
+ 'sphinx~=7.1',
48
+ 'sphinx-rtd-theme~=2.0',
49
+ 'm2r2==0.3.3.post2',
52
50
  'mistune<2.0.0',
53
51
  'flit~=3.9',
54
- 'ambient-package-update~=23.12.4',
52
+ 'ambient-package-update~=24.4.4',
55
53
  'unittest-parametrize~=1.4',
56
54
  ]
57
55
 
@@ -66,7 +64,7 @@ name = "django_dynamic_admin_forms"
66
64
  'Changelog' = 'https://django-dynamic-admin-forms.readthedocs.io/en/latest/features/changelog.html'
67
65
 
68
66
  [tool.ruff]
69
- select = [
67
+ lint.select = [
70
68
  "E", # pycodestyle errors
71
69
  "W", # pycodestyle warnings
72
70
  "F", # Pyflakes
@@ -88,11 +86,11 @@ select = [
88
86
  "PGH", # No all-purpose "# noqa" and eval validation
89
87
  "PL", # PyLint
90
88
  ]
91
- ignore = [
89
+ lint.ignore = [
92
90
  ]
93
91
 
94
92
  # Allow autofix for all enabled rules (when `--fix`) is provided.
95
- fixable = [
93
+ lint.fixable = [
96
94
  "E", # pycodestyle errors
97
95
  "W", # pycodestyle warnings
98
96
  "F", # Pyflakes
@@ -114,7 +112,7 @@ fixable = [
114
112
  "PGH", # No all-purpose "# noqa" and eval validation
115
113
  "PL", # PyLint
116
114
  ]
117
- unfixable = []
115
+ lint.unfixable = []
118
116
 
119
117
  exclude = [
120
118
  ".bzr",
@@ -171,8 +169,6 @@ isolated_build = True
171
169
  [testenv]
172
170
  # Django deprecation overview: https://www.djangoproject.com/download/
173
171
  deps =
174
- django32: Django==3.2.*
175
- django41: Django==4.1.*
176
172
  django42: Django==4.2.*
177
173
  django50: Django==5.0.*
178
174
  extras = dev,
@@ -187,3 +183,10 @@ python =
187
183
  3.11: py311
188
184
  3.12: py312
189
185
  """
186
+
187
+ [tool.pytest.ini_options]
188
+ python_files = [
189
+ "tests.py",
190
+ "test_*.py",
191
+ "*_tests.py",
192
+ ]
@@ -1,86 +1,86 @@
1
- """
2
- Django settings for config project.
3
-
4
- Generated by 'django-admin startproject' using Django 3.1.3.
5
-
6
- For more information on this file, see
7
- https://docs.djangoproject.com/en/3.1/topics/settings/
8
-
9
- For the full list of settings and their values, see
10
- https://docs.djangoproject.com/en/3.1/ref/settings/
11
- """
12
-
13
- from pathlib import Path
14
-
15
- # Build paths inside the project like this: BASE_DIR / 'subdir'.
16
- BASE_DIR = Path(__file__).resolve().parent
17
-
18
-
19
- # Quick-start development settings - unsuitable for production
20
- # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
21
-
22
- # SECURITY WARNING: keep the secret key used in production secret!
23
- SECRET_KEY = "7t!88vton98+=cb#=&4_5en37480c7+5qu9u=1@vfz#esaen0e"
24
-
25
- # SECURITY WARNING: don't run with debug turned on in production!
26
- DEBUG = True
27
-
28
- ALLOWED_HOSTS = ["localhost", "127.0.0.1"]
29
-
30
- ROOT_URLCONF = "testapp.urls"
31
-
32
- INSTALLED_APPS = [
33
- "django_dynamic_admin_forms",
34
- "django.contrib.admin",
35
- "django.contrib.auth",
36
- "django.contrib.contenttypes",
37
- "django.contrib.sessions",
38
- "django.contrib.messages",
39
- "django.contrib.staticfiles",
40
- "testapp",
41
- ]
42
-
43
- MIDDLEWARE = [
44
- "django.middleware.security.SecurityMiddleware",
45
- "django.contrib.sessions.middleware.SessionMiddleware",
46
- "django.middleware.common.CommonMiddleware",
47
- # "django.middleware.csrf.CsrfViewMiddleware",
48
- "django.contrib.auth.middleware.AuthenticationMiddleware",
49
- "django.contrib.messages.middleware.MessageMiddleware",
50
- "django.middleware.clickjacking.XFrameOptionsMiddleware",
51
- ]
52
-
53
-
54
- TEMPLATES = [
55
- {
56
- "BACKEND": "django.template.backends.django.DjangoTemplates",
57
- "DIRS": [BASE_DIR / "templates"],
58
- "APP_DIRS": True,
59
- "OPTIONS": {
60
- "context_processors": [
61
- "django.template.context_processors.debug",
62
- "django.template.context_processors.request",
63
- "django.contrib.auth.context_processors.auth",
64
- "django.contrib.messages.context_processors.messages",
65
- ],
66
- },
67
- },
68
- ]
69
-
70
-
71
- # Database
72
- # https://docs.djangoproject.com/en/3.1/ref/settings/#databases
73
-
74
- DATABASES = {
75
- "default": {
76
- "ENGINE": "django.db.backends.sqlite3",
77
- "NAME": BASE_DIR / "db.sqlite3",
78
- }
79
- }
80
-
81
- # Static files (CSS, JavaScript, Images)
82
- # https://docs.djangoproject.com/en/3.1/howto/static-files/
83
-
84
- STATIC_ROOT = BASE_DIR / "staticfiles"
85
- STATIC_URL = "/static/"
86
- STATICFILES_DIRS = [BASE_DIR / "static"]
1
+ """
2
+ Django settings for config project.
3
+
4
+ Generated by 'django-admin startproject' using Django 3.1.3.
5
+
6
+ For more information on this file, see
7
+ https://docs.djangoproject.com/en/3.1/topics/settings/
8
+
9
+ For the full list of settings and their values, see
10
+ https://docs.djangoproject.com/en/3.1/ref/settings/
11
+ """
12
+
13
+ from pathlib import Path
14
+
15
+ # Build paths inside the project like this: BASE_DIR / 'subdir'.
16
+ BASE_DIR = Path(__file__).resolve().parent
17
+
18
+
19
+ # Quick-start development settings - unsuitable for production
20
+ # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
21
+
22
+ # SECURITY WARNING: keep the secret key used in production secret!
23
+ SECRET_KEY = "7t!88vton98+=cb#=&4_5en37480c7+5qu9u=1@vfz#esaen0e"
24
+
25
+ # SECURITY WARNING: don't run with debug turned on in production!
26
+ DEBUG = True
27
+
28
+ ALLOWED_HOSTS = ["localhost", "127.0.0.1"]
29
+
30
+ ROOT_URLCONF = "testapp.urls"
31
+
32
+ INSTALLED_APPS = [
33
+ "django_dynamic_admin_forms",
34
+ "django.contrib.admin",
35
+ "django.contrib.auth",
36
+ "django.contrib.contenttypes",
37
+ "django.contrib.sessions",
38
+ "django.contrib.messages",
39
+ "django.contrib.staticfiles",
40
+ "testapp",
41
+ ]
42
+
43
+ MIDDLEWARE = [
44
+ "django.middleware.security.SecurityMiddleware",
45
+ "django.contrib.sessions.middleware.SessionMiddleware",
46
+ "django.middleware.common.CommonMiddleware",
47
+ # "django.middleware.csrf.CsrfViewMiddleware",
48
+ "django.contrib.auth.middleware.AuthenticationMiddleware",
49
+ "django.contrib.messages.middleware.MessageMiddleware",
50
+ "django.middleware.clickjacking.XFrameOptionsMiddleware",
51
+ ]
52
+
53
+
54
+ TEMPLATES = [
55
+ {
56
+ "BACKEND": "django.template.backends.django.DjangoTemplates",
57
+ "DIRS": [BASE_DIR / "templates"],
58
+ "APP_DIRS": True,
59
+ "OPTIONS": {
60
+ "context_processors": [
61
+ "django.template.context_processors.debug",
62
+ "django.template.context_processors.request",
63
+ "django.contrib.auth.context_processors.auth",
64
+ "django.contrib.messages.context_processors.messages",
65
+ ],
66
+ },
67
+ },
68
+ ]
69
+
70
+
71
+ # Database
72
+ # https://docs.djangoproject.com/en/3.1/ref/settings/#databases
73
+
74
+ DATABASES = {
75
+ "default": {
76
+ "ENGINE": "django.db.backends.sqlite3",
77
+ "NAME": BASE_DIR / "db.sqlite3",
78
+ }
79
+ }
80
+
81
+ # Static files (CSS, JavaScript, Images)
82
+ # https://docs.djangoproject.com/en/3.1/howto/static-files/
83
+
84
+ STATIC_ROOT = BASE_DIR / "staticfiles"
85
+ STATIC_URL = "/static/"
86
+ STATICFILES_DIRS = [BASE_DIR / "static"]
@@ -1,22 +1,23 @@
1
- """config URL Configuration
2
-
3
- The `urlpatterns` list routes URLs to views. For more information please see:
4
- https://docs.djangoproject.com/en/3.1/topics/http/urls/
5
- Examples:
6
- Function views
7
- 1. Add an import: from my_app import views
8
- 2. Add a URL to urlpatterns: path('', views.home, name='home')
9
- Class-based views
10
- 1. Add an import: from other_app.views import Home
11
- 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
12
- Including another URLconf
13
- 1. Import the include() function: from django.urls import include, path
14
- 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
15
- """
16
- from django.contrib import admin
17
- from django.urls import include, path
18
-
19
- urlpatterns = [
20
- path("admin/", admin.site.urls),
21
- path("dynamic-admin-form/", include("django_dynamic_admin_forms.urls")),
22
- ]
1
+ """config URL Configuration
2
+
3
+ The `urlpatterns` list routes URLs to views. For more information please see:
4
+ https://docs.djangoproject.com/en/3.1/topics/http/urls/
5
+ Examples:
6
+ Function views
7
+ 1. Add an import: from my_app import views
8
+ 2. Add a URL to urlpatterns: path('', views.home, name='home')
9
+ Class-based views
10
+ 1. Add an import: from other_app.views import Home
11
+ 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
12
+ Including another URLconf
13
+ 1. Import the include() function: from django.urls import include, path
14
+ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
15
+ """
16
+
17
+ from django.contrib import admin
18
+ from django.urls import include, path
19
+
20
+ urlpatterns = [
21
+ path("admin/", admin.site.urls),
22
+ path("dynamic-admin-form/", include("django_dynamic_admin_forms.urls")),
23
+ ]
@@ -1,2 +0,0 @@
1
- [pytest]
2
- python_files = tests.py test_*.py *_tests.py