django-bootstrap3 24.2__tar.gz → 24.3__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 (86) hide show
  1. django_bootstrap3-24.3/.editorconfig +23 -0
  2. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/CHANGELOG.md +4 -0
  3. django_bootstrap3-24.3/MANIFEST.in +17 -0
  4. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/Makefile +6 -3
  5. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/PKG-INFO +5 -4
  6. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/README.md +1 -1
  7. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/docs/conf.py +1 -1
  8. django_bootstrap3-24.3/docs/requirements.txt +3 -0
  9. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/example/app/views.py +3 -2
  10. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/pyproject.toml +13 -12
  11. django_bootstrap3-24.3/requirements-dev.txt +8 -0
  12. django_bootstrap3-24.3/requirements-test.txt +3 -0
  13. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/bootstrap3/renderers.py +3 -13
  14. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/bootstrap3/utils.py +0 -2
  15. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/django_bootstrap3.egg-info/PKG-INFO +5 -4
  16. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/django_bootstrap3.egg-info/SOURCES.txt +3 -6
  17. django_bootstrap3-24.3/src/django_bootstrap3.egg-info/requires.txt +1 -0
  18. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/tests/app/forms.py +1 -1
  19. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/tests/test_templatetags.py +1 -7
  20. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/tox.ini +8 -11
  21. django_bootstrap3-24.2/.github/dependabot.yml +0 -17
  22. django_bootstrap3-24.2/.github/stale.yml +0 -18
  23. django_bootstrap3-24.2/.github/workflows/dependabot-auto-approve-and-merge.yml +0 -35
  24. django_bootstrap3-24.2/.github/workflows/test.yml +0 -91
  25. django_bootstrap3-24.2/.gitignore +0 -68
  26. django_bootstrap3-24.2/docs/requirements.txt +0 -3
  27. django_bootstrap3-24.2/requirements-dev.txt +0 -6
  28. django_bootstrap3-24.2/requirements-test.txt +0 -3
  29. django_bootstrap3-24.2/src/django_bootstrap3.egg-info/requires.txt +0 -1
  30. /django_bootstrap3-24.2/.readthedocs.yml → /django_bootstrap3-24.3/.readthedocs.yaml +0 -0
  31. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/AUTHORS +0 -0
  32. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/CONTRIBUTING.md +0 -0
  33. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/LICENSE +0 -0
  34. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/docs/changelog.rst +0 -0
  35. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/docs/example_template.rst +0 -0
  36. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/docs/index.rst +0 -0
  37. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/docs/installation.rst +0 -0
  38. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/docs/quickstart.rst +0 -0
  39. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/docs/settings.rst +0 -0
  40. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/docs/templates.rst +0 -0
  41. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/docs/templatetags.rst +0 -0
  42. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/example/app/__init__.py +0 -0
  43. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/example/app/forms.py +0 -0
  44. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/example/app/templates/app/base.html +0 -0
  45. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/example/app/templates/app/bootstrap.html +0 -0
  46. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/example/app/templates/app/form.html +0 -0
  47. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/example/app/templates/app/form_by_field.html +0 -0
  48. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/example/app/templates/app/form_horizontal.html +0 -0
  49. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/example/app/templates/app/form_inline.html +0 -0
  50. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/example/app/templates/app/form_with_files.html +0 -0
  51. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/example/app/templates/app/formset.html +0 -0
  52. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/example/app/templates/app/home.html +0 -0
  53. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/example/app/templates/app/misc.html +0 -0
  54. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/example/app/templates/app/pagination.html +0 -0
  55. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/example/app/urls.py +0 -0
  56. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/example/app/wsgi.py +0 -0
  57. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/example/manage.py +0 -0
  58. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/example/settings.py +0 -0
  59. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/manage.py +0 -0
  60. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/setup.cfg +0 -0
  61. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/bootstrap3/__about__.py +0 -0
  62. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/bootstrap3/__init__.py +0 -0
  63. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/bootstrap3/bootstrap.py +0 -0
  64. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/bootstrap3/components.py +0 -0
  65. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/bootstrap3/exceptions.py +0 -0
  66. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/bootstrap3/forms.py +0 -0
  67. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/bootstrap3/models.py +0 -0
  68. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/bootstrap3/templates/bootstrap3/bootstrap3.html +0 -0
  69. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/bootstrap3/templates/bootstrap3/field_error.html +0 -0
  70. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/bootstrap3/templates/bootstrap3/field_help_text.html +0 -0
  71. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/bootstrap3/templates/bootstrap3/field_help_text_and_errors.html +0 -0
  72. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/bootstrap3/templates/bootstrap3/form_errors.html +0 -0
  73. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/bootstrap3/templates/bootstrap3/messages.html +0 -0
  74. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/bootstrap3/templates/bootstrap3/pagination.html +0 -0
  75. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/bootstrap3/templatetags/__init__.py +0 -0
  76. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/bootstrap3/templatetags/bootstrap3.py +0 -0
  77. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/bootstrap3/text.py +0 -0
  78. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/django_bootstrap3.egg-info/dependency_links.txt +0 -0
  79. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/src/django_bootstrap3.egg-info/top_level.txt +0 -0
  80. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/tests/__init__.py +0 -0
  81. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/tests/app/__init__.py +0 -0
  82. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/tests/app/settings.py +0 -0
  83. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/tests/app/urls.py +0 -0
  84. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/tests/test_settings.py +0 -0
  85. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/tests/test_templates.py +0 -0
  86. {django_bootstrap3-24.2 → django_bootstrap3-24.3}/tests/test_version.py +0 -0
@@ -0,0 +1,23 @@
1
+ # https://editorconfig.org/
2
+
3
+ root = true
4
+
5
+ [*]
6
+ indent_style = space
7
+ indent_size = 4
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
10
+ end_of_line = lf
11
+ charset = utf-8
12
+
13
+ [*.py]
14
+ max_line_length = 88
15
+
16
+ [*.toml]
17
+ indent_size = 2
18
+
19
+ [docs/**.rst]
20
+ max_line_length = 79
21
+
22
+ [*.{yaml,yml}]
23
+ indent_size = 2
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 24.3 (2024-09-18)
4
+
5
+ - Add support for Django 5.1 (#1013)
6
+
3
7
  ## 24.2 (2024-04-17)
4
8
 
5
9
  - Reinstate setuptools_scm for build (#965).
@@ -0,0 +1,17 @@
1
+ include LICENSE
2
+ include MANIFEST.in
3
+ include .editorconfig
4
+ include *.yaml
5
+ include pyproject.toml
6
+ include *.md
7
+ include *.py
8
+ include *.txt
9
+ include Makefile
10
+ include tox.ini
11
+ include docs/*.rst docs/*.txt docs/*.py docs/Makefile
12
+ graft src
13
+ graft tests
14
+ graft example
15
+ prune docs/_build
16
+ exclude example/db.sqlite3
17
+ global-exclude *.py[cod]
@@ -45,12 +45,15 @@ else
45
45
  endif
46
46
 
47
47
  .PHONY: build
48
- build: docs
48
+ build:
49
49
  python -m build
50
+ twine check dist/*
51
+ check-manifest
52
+ pyroma .
53
+ check-wheel-contents dist
50
54
 
51
55
  .PHONY: publish
52
- publish: porcelain branch build
53
- twine check dist/*
56
+ publish: porcelain branch docs build
54
57
  twine upload dist/*
55
58
  git tag -a v${VERSION} -m "Release ${VERSION}"
56
59
  git push origin --tags
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-bootstrap3
3
- Version: 24.2
3
+ Version: 24.3
4
4
  Summary: Bootstrap 3 for Django
5
5
  Author-email: Dylan Verheul <dylan@dyve.net>
6
6
  License: BSD 3-Clause License
@@ -38,12 +38,13 @@ Project-URL: Documentation, https://django-bootstrap3.readthedocs.io/
38
38
  Project-URL: Homepage, https://github.com/zostera/django-bootstrap3
39
39
  Project-URL: Issues, https://github.com/zostera/django-bootstrap3/issues
40
40
  Project-URL: Source, https://github.com/zostera/django-bootstrap3
41
+ Keywords: django,bootstrap,bootstrap3
41
42
  Classifier: Development Status :: 5 - Production/Stable
42
43
  Classifier: Environment :: Web Environment
43
44
  Classifier: Framework :: Django
44
- Classifier: Framework :: Django :: 4.1
45
45
  Classifier: Framework :: Django :: 4.2
46
46
  Classifier: Framework :: Django :: 5.0
47
+ Classifier: Framework :: Django :: 5.1
47
48
  Classifier: Intended Audience :: Developers
48
49
  Classifier: License :: OSI Approved :: BSD License
49
50
  Classifier: Operating System :: OS Independent
@@ -59,11 +60,11 @@ Requires-Python: >=3.8
59
60
  Description-Content-Type: text/markdown
60
61
  License-File: LICENSE
61
62
  License-File: AUTHORS
62
- Requires-Dist: Django>=4.1
63
+ Requires-Dist: Django>=4.2
63
64
 
64
65
  # django-bootstrap3
65
66
 
66
- [![CI](https://github.com/zostera/django-bootstrap3/workflows/CI/badge.svg?branch=main)](https://github.com/zostera/django-bootstrap3/actions?workflow=CI)
67
+ [![CI](https://github.com/zostera/django-bootstrap3/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/zostera/django-bootstrap3/actions?workflow=test)
67
68
  [![Coverage Status](https://coveralls.io/repos/github/zostera/django-bootstrap3/badge.svg?branch=main)](https://coveralls.io/github/zostera/django-bootstrap3?branch=main)
68
69
  [![Latest PyPI version](https://img.shields.io/pypi/v/django-bootstrap3.svg)](https://pypi.python.org/pypi/django-bootstrap3)
69
70
 
@@ -1,6 +1,6 @@
1
1
  # django-bootstrap3
2
2
 
3
- [![CI](https://github.com/zostera/django-bootstrap3/workflows/CI/badge.svg?branch=main)](https://github.com/zostera/django-bootstrap3/actions?workflow=CI)
3
+ [![CI](https://github.com/zostera/django-bootstrap3/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/zostera/django-bootstrap3/actions?workflow=test)
4
4
  [![Coverage Status](https://coveralls.io/repos/github/zostera/django-bootstrap3/badge.svg?branch=main)](https://coveralls.io/github/zostera/django-bootstrap3?branch=main)
5
5
  [![Latest PyPI version](https://img.shields.io/pypi/v/django-bootstrap3.svg)](https://pypi.python.org/pypi/django-bootstrap3)
6
6
 
@@ -15,7 +15,7 @@ copyright = f"{year}, {author}"
15
15
  extensions = [
16
16
  "sphinx.ext.autodoc",
17
17
  "sphinx.ext.viewcode",
18
- "sphinx_mdinclude",
18
+ "myst_parser",
19
19
  ]
20
20
 
21
21
  htmlhelp_basename = f"{project}-doc"
@@ -0,0 +1,3 @@
1
+ sphinx==8.0.2
2
+ myst-parser==4.0.0
3
+ furo==2024.8.6
@@ -68,9 +68,10 @@ class PaginationView(TemplateView):
68
68
 
69
69
  def get_context_data(self, **kwargs):
70
70
  context = super().get_context_data(**kwargs)
71
+ num_lines = 200
71
72
  lines = []
72
- for i in range(200):
73
- lines.append("Line %s" % (i + 1))
73
+ for i in range(1, num_lines + 1):
74
+ lines.append(f"Line {i}")
74
75
  paginator = Paginator(lines, 10)
75
76
  page = self.request.GET.get("page")
76
77
  try:
@@ -1,6 +1,6 @@
1
1
  [build-system]
2
2
  build-backend = "setuptools.build_meta"
3
- requires = ["setuptools>=64", "setuptools_scm>=8"]
3
+ requires = ["setuptools>=64"]
4
4
 
5
5
  [project]
6
6
  authors = [
@@ -10,9 +10,9 @@ classifiers = [
10
10
  "Development Status :: 5 - Production/Stable",
11
11
  "Environment :: Web Environment",
12
12
  "Framework :: Django",
13
- "Framework :: Django :: 4.1",
14
13
  "Framework :: Django :: 4.2",
15
14
  "Framework :: Django :: 5.0",
15
+ "Framework :: Django :: 5.1",
16
16
  "Intended Audience :: Developers",
17
17
  "License :: OSI Approved :: BSD License",
18
18
  "Operating System :: OS Independent",
@@ -25,15 +25,14 @@ classifiers = [
25
25
  "Topic :: Software Development :: Libraries",
26
26
  "Topic :: Utilities",
27
27
  ]
28
- dependencies = [
29
- "Django>=4.1",
30
- ]
28
+ dependencies = ["Django>=4.2"]
31
29
  description = "Bootstrap 3 for Django"
30
+ keywords = ["django", "bootstrap", "bootstrap3"]
32
31
  license = {file = "LICENSE"}
33
32
  name = "django-bootstrap3"
34
33
  readme = "README.md"
35
34
  requires-python = ">=3.8"
36
- version = "24.2"
35
+ version = "24.3"
37
36
 
38
37
  [project.urls]
39
38
  Changelog = "https://github.com/zostera/django-bootstrap3/blob/main/CHANGELOG.md"
@@ -45,30 +44,32 @@ Source = "https://github.com/zostera/django-bootstrap3"
45
44
  [tool.ruff]
46
45
  fix = false
47
46
  line-length = 120
48
- lint.fixable = [
47
+ src = ["src"]
48
+ target-version = "py38"
49
+
50
+ [tool.ruff.lint]
51
+ fixable = [
49
52
  "I001", # isort (sorting)
50
53
  "F", # flake8
51
54
  "D", # docformatter
52
55
  "UP", # pyupgrade
53
56
  ]
54
- lint.ignore = [
57
+ ignore = [
55
58
  "D1", # D1: Missing docstring error codes (because not every function and class has a docstring)
56
59
  "D203", # D203: 1 blank line required before class docstring (conflicts with D211 and should be disabled, see https://github.com/PyCQA/pydocstyle/pull/91)
57
60
  "D212", # D212: Multi-line docstring summary should start at the first line
58
61
  "D301", # D301: Use r”“” if any backslashes in a docstring (unclear how else to handle backslashes in docstrings)
59
62
  ]
60
- lint.select = [
63
+ select = [
61
64
  "D", # pydocstyle
62
65
  "E", # pycodestyle
63
66
  "F", # flake8
64
67
  "I", # isort
65
68
  "UP", # pyupgrade
66
69
  ]
67
- lint.unfixable = [
70
+ unfixable = [
68
71
  "F8", # names in flake8, such as defined but unused variables
69
72
  ]
70
- src = ["src"]
71
- target-version = "py38"
72
73
 
73
74
  [tool.ruff.lint.isort]
74
75
  known-first-party = ["bootstrap3", "app"]
@@ -0,0 +1,8 @@
1
+ -r requirements-test.txt
2
+ -r docs/requirements.txt
3
+ twine==5.1.1
4
+ build==1.2.2
5
+ setuptools==75.1.0
6
+ check-manifest==0.49
7
+ pyroma==4.2
8
+ check-wheel-contents==0.6.0
@@ -0,0 +1,3 @@
1
+ tox==4.19.0
2
+ coverage==7.6.1
3
+ ruff==0.6.5
@@ -33,7 +33,7 @@ from .forms import (
33
33
  render_label,
34
34
  )
35
35
  from .text import text_value
36
- from .utils import IS_PRE_DJANGO4, add_css_class, render_template_file
36
+ from .utils import add_css_class, render_template_file
37
37
 
38
38
  try:
39
39
  # If Django is set up without a database, importing this widget gives RuntimeError
@@ -71,7 +71,7 @@ class BaseRenderer:
71
71
  return "large"
72
72
  if size in ("md", "medium", ""):
73
73
  return "medium"
74
- raise BootstrapError('Invalid value "%s" for parameter "size" (expected "sm", "md", "lg" or "").' % size)
74
+ raise BootstrapError(f'Invalid value "{size}" for parameter "size" (expected "sm", "md", "lg" or "").')
75
75
 
76
76
  def get_size_class(self, prefix="input"):
77
77
  if self.size == "small":
@@ -313,17 +313,7 @@ class FieldRenderer(BaseRenderer):
313
313
 
314
314
  def list_to_class(self, html, klass):
315
315
  classes = add_css_class(klass, self.get_size_class())
316
- if IS_PRE_DJANGO4:
317
- return self._list_to_class_pre_django4(html, classes)
318
- return re.sub("\s*<div>\s*<label", f' <div class="{classes}"><label', html)
319
-
320
- def _list_to_class_pre_django4(self, html, classes):
321
- return (
322
- html.replace("<ul", "<div")
323
- .replace("</ul>", "</div>")
324
- .replace("<li", f'<div class="{classes}"')
325
- .replace("</li>", "</div>")
326
- )
316
+ return re.sub(r"\s*<div>\s*<label", f' <div class="{classes}"><label', html)
327
317
 
328
318
  def put_inside_label(self, html):
329
319
  content = f"{html} {self.label}"
@@ -15,8 +15,6 @@ from bootstrap3.exceptions import BootstrapError
15
15
  from .text import text_value
16
16
 
17
17
  DJANGO_VERSION = get_version()
18
- # TODO: Remove after support for Django 3.x ends
19
- IS_PRE_DJANGO4 = DJANGO_VERSION < "4"
20
18
  IS_DJANGO5 = DJANGO_VERSION >= "5"
21
19
 
22
20
  # RegEx for quoted string
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-bootstrap3
3
- Version: 24.2
3
+ Version: 24.3
4
4
  Summary: Bootstrap 3 for Django
5
5
  Author-email: Dylan Verheul <dylan@dyve.net>
6
6
  License: BSD 3-Clause License
@@ -38,12 +38,13 @@ Project-URL: Documentation, https://django-bootstrap3.readthedocs.io/
38
38
  Project-URL: Homepage, https://github.com/zostera/django-bootstrap3
39
39
  Project-URL: Issues, https://github.com/zostera/django-bootstrap3/issues
40
40
  Project-URL: Source, https://github.com/zostera/django-bootstrap3
41
+ Keywords: django,bootstrap,bootstrap3
41
42
  Classifier: Development Status :: 5 - Production/Stable
42
43
  Classifier: Environment :: Web Environment
43
44
  Classifier: Framework :: Django
44
- Classifier: Framework :: Django :: 4.1
45
45
  Classifier: Framework :: Django :: 4.2
46
46
  Classifier: Framework :: Django :: 5.0
47
+ Classifier: Framework :: Django :: 5.1
47
48
  Classifier: Intended Audience :: Developers
48
49
  Classifier: License :: OSI Approved :: BSD License
49
50
  Classifier: Operating System :: OS Independent
@@ -59,11 +60,11 @@ Requires-Python: >=3.8
59
60
  Description-Content-Type: text/markdown
60
61
  License-File: LICENSE
61
62
  License-File: AUTHORS
62
- Requires-Dist: Django>=4.1
63
+ Requires-Dist: Django>=4.2
63
64
 
64
65
  # django-bootstrap3
65
66
 
66
- [![CI](https://github.com/zostera/django-bootstrap3/workflows/CI/badge.svg?branch=main)](https://github.com/zostera/django-bootstrap3/actions?workflow=CI)
67
+ [![CI](https://github.com/zostera/django-bootstrap3/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/zostera/django-bootstrap3/actions?workflow=test)
67
68
  [![Coverage Status](https://coveralls.io/repos/github/zostera/django-bootstrap3/badge.svg?branch=main)](https://coveralls.io/github/zostera/django-bootstrap3?branch=main)
68
69
  [![Latest PyPI version](https://img.shields.io/pypi/v/django-bootstrap3.svg)](https://pypi.python.org/pypi/django-bootstrap3)
69
70
 
@@ -1,9 +1,10 @@
1
- .gitignore
2
- .readthedocs.yml
1
+ .editorconfig
2
+ .readthedocs.yaml
3
3
  AUTHORS
4
4
  CHANGELOG.md
5
5
  CONTRIBUTING.md
6
6
  LICENSE
7
+ MANIFEST.in
7
8
  Makefile
8
9
  README.md
9
10
  manage.py
@@ -11,10 +12,6 @@ pyproject.toml
11
12
  requirements-dev.txt
12
13
  requirements-test.txt
13
14
  tox.ini
14
- .github/dependabot.yml
15
- .github/stale.yml
16
- .github/workflows/dependabot-auto-approve-and-merge.yml
17
- .github/workflows/test.yml
18
15
  docs/changelog.rst
19
16
  docs/conf.py
20
17
  docs/example_template.rst
@@ -129,7 +129,7 @@ def render_form(form=None, context=None):
129
129
 
130
130
  def render_form_field(field, context=None):
131
131
  """Create a template that renders a field."""
132
- form_field = "form.%s" % field
132
+ form_field = f"form.{field}"
133
133
  return render_template_with_form("{% bootstrap_field " + form_field + " %}", context)
134
134
 
135
135
 
@@ -8,7 +8,6 @@ from bootstrap3.exceptions import BootstrapError
8
8
  from bootstrap3.text import text_concat, text_value
9
9
  from bootstrap3.utils import (
10
10
  IS_DJANGO5,
11
- IS_PRE_DJANGO4,
12
11
  add_css_class,
13
12
  render_tag,
14
13
  url_to_attrs_dict,
@@ -46,7 +45,7 @@ class FormTest(TestCase):
46
45
  self.assertIn('name="datetime_0"', res)
47
46
  self.assertIn('name="datetime_1"', res)
48
47
  else:
49
- self.assertIn('name="%s"' % field.name, res)
48
+ self.assertIn(f'name="{field.name}"', res)
50
49
 
51
50
  def test_field_addons(self):
52
51
  form = TestForm()
@@ -572,11 +571,6 @@ class InlineLayoutTestCase(TestCase):
572
571
  </div>
573
572
  </div>
574
573
  """
575
- if IS_PRE_DJANGO4:
576
- expected = expected.replace(
577
- '<label class="sr-only">Radio</label>',
578
- '<label class="sr-only" for="id_radio_0">Radio</label>',
579
- )
580
574
  self.assertHTMLEqual(res, expected)
581
575
  self.assertIn(
582
576
  ' <div class="radio">',
@@ -1,17 +1,16 @@
1
1
  [tox]
2
2
  args_are_paths = false
3
3
  envlist =
4
- py38-{4.1,4.2},
5
- py39-{4.1,4.2},
6
- py310-{4.1,4.2,5.0,main},
7
- py311-{4.1,4.2,5.0,main},
8
- py312-{4.2,5.0,main},
4
+ py38-{4.2},
5
+ py39-{4.2},
6
+ py310-{4.2,5.0,5.1,main},
7
+ py311-{4.2,5.0,5.1,main},
8
+ py312-{4.2,5.0,5.1,main},
9
9
  docs,
10
- lint,
10
+ ruff,
11
11
 
12
12
  [testenv]
13
13
  basepython =
14
- py37: python3.7
15
14
  py38: python3.8
16
15
  py39: python3.9
17
16
  py310: python3.10
@@ -25,18 +24,16 @@ setenv =
25
24
  commands =
26
25
  python manage.py test {posargs}
27
26
  deps =
28
- 4.0: Django==4.0.*
29
- 4.1: Django==4.1.*
30
27
  4.2: Django==4.2.*
31
28
  5.0: Django==5.0.*
29
+ 5.1: Django==5.1.*
32
30
  main: https://github.com/django/django/archive/main.tar.gz
33
31
  -r{toxinidir}/requirements-test.txt
34
32
 
35
33
  [testenv:ruff]
36
34
  basepython = python3.11
37
- allowlist_externals = ruff
38
35
  deps = ruff
39
- commands = ruff .
36
+ commands = ruff check .
40
37
 
41
38
  [testenv:docs]
42
39
  basepython = python3.11
@@ -1,17 +0,0 @@
1
- # Dependabot configuration
2
- # https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/configuration-options-for-dependency-updates
3
-
4
- version: 2
5
- updates:
6
-
7
- # Maintain dependencies for GitHub Actions
8
- - package-ecosystem: "github-actions"
9
- directory: "/"
10
- schedule:
11
- interval: "daily"
12
-
13
- # Maintain dependencies for pip
14
- - package-ecosystem: "pip"
15
- directory: "/"
16
- schedule:
17
- interval: "daily"
@@ -1,18 +0,0 @@
1
- # Number of days of inactivity before an issue becomes stale
2
- daysUntilStale: 60
3
- # Number of days of inactivity before a stale issue is closed
4
- daysUntilClose: 7
5
- # Issues with these labels will never be considered stale
6
- exemptLabels:
7
- - pinned
8
- - security
9
- - accepted
10
- # Label to use when marking an issue as stale
11
- staleLabel: wontfix
12
- # Comment to post when marking an issue as stale. Set to `false` to disable
13
- markComment: >
14
- This issue has been automatically marked as stale because it has not had
15
- recent activity. It will be closed if no further activity occurs. Thank you
16
- for your contributions.
17
- # Comment to post when closing a stale issue. Set to `false` to disable
18
- closeComment: false
@@ -1,35 +0,0 @@
1
- name: Dependabot PR Approve and Merge
2
- # Original: https://blog.somewhatabstract.com/2021/10/11/setting-up-dependabot-with-github-actions-to-approve-and-merge/?utm_source=pocket_mylist
3
- # See also: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions#approve-a-pull-request
4
-
5
- on: pull_request_target
6
-
7
- permissions:
8
- pull-requests: write
9
- contents: write
10
-
11
- jobs:
12
- dependabot:
13
- runs-on: ubuntu-latest
14
- # Check the actor, only run for Dependabot PRs, prevent failing on non-Dependabot PRs.
15
- if: ${{ github.actor == 'dependabot[bot]' }}
16
- steps:
17
- # This step will fail (without approval) if there's no metadata.
18
- - name: Dependabot metadata
19
- id: dependabot-metadata
20
- uses: dependabot/fetch-metadata@v2.0.0
21
- with:
22
- github-token: "${{ secrets.GITHUB_TOKEN }}"
23
- # Approve the PR.
24
- - name: Approve a PR
25
- run: gh pr review --approve "$PR_URL"
26
- env:
27
- PR_URL: ${{ github.event.pull_request.html_url }}
28
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29
- # Allow auto-merging for patch and minor updates if all checks pass.
30
- - name: Enable auto-merge for Dependabot PRs
31
- if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
32
- run: gh pr merge --auto --squash "$PR_URL"
33
- env:
34
- PR_URL: ${{ github.event.pull_request.html_url }}
35
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -1,91 +0,0 @@
1
- name: test
2
-
3
- on: [ push ]
4
-
5
- concurrency:
6
- group: test-${{ github.head_ref }}
7
- cancel-in-progress: true
8
-
9
- jobs:
10
- ruff:
11
- runs-on: ubuntu-latest
12
- steps:
13
- - uses: actions/checkout@v4
14
- - uses: chartboost/ruff-action@v1
15
-
16
- tests_matrix:
17
- runs-on: ubuntu-latest
18
- strategy:
19
- matrix:
20
- python-version: [3.8, 3.9, "3.10", 3.11, 3.12]
21
- django-version: [4.1, 4.2, 5.0, "main"]
22
- exclude:
23
- # Django 4.1
24
- - python-version: 3.12
25
- django-version: 4.1
26
-
27
- # Django 4.2
28
- - python-version: 3.12
29
- django-version: 4.2
30
-
31
- # Django 5.0
32
- - python-version: 3.8
33
- django-version: 5.0
34
- - python-version: 3.9
35
- django-version: 5.0
36
-
37
- # Django main
38
- - python-version: 3.8
39
- django-version: "main"
40
- - python-version: 3.9
41
- django-version: "main"
42
-
43
- steps:
44
- - uses: actions/checkout@v4
45
- - name: Set up Python ${{ matrix.python-version }}
46
- uses: actions/setup-python@v5
47
- with:
48
- python-version: ${{ matrix.python-version }}
49
- cache: 'pip'
50
- cache-dependency-path: requirements-test.txt
51
- - run: python -m pip install -r requirements-test.txt
52
- - run: python -m pip install -U Django==${{ matrix.django-version }}
53
- if: matrix.django-version != 'main'
54
- - run: python -m pip install -U https://github.com/django/django/archive/master.tar.gz
55
- if: matrix.django-version == 'main'
56
- - run: python -m pip install -e .
57
- - run: coverage run manage.py test
58
- - run: python -m pip install -U coveralls
59
- - name: Upload coveralls (parallel)
60
- env:
61
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62
- COVERALLS_PARALLEL: true
63
- run: coveralls --service=github
64
-
65
- docs:
66
- runs-on: ubuntu-latest
67
- steps:
68
- - uses: actions/checkout@v4
69
- - uses: actions/setup-python@v5
70
- with:
71
- python-version: "3.11"
72
- cache: 'pip'
73
- cache-dependency-path: docs/requirements.txt
74
- - name: Install and build
75
- run: |
76
- python -m pip install -r docs/requirements.txt
77
- make docs
78
-
79
- tests:
80
- if: always()
81
- runs-on: ubuntu-latest
82
- needs: [ tests_matrix, ruff, docs ]
83
- steps:
84
- - name: Check tests matrix status
85
- if: needs.tests_matrix.result != 'success'
86
- run: exit 1
87
- - name: Finish parallel build
88
- uses: coverallsapp/github-action@v2
89
- with:
90
- parallel-finished: true
91
- github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -1,68 +0,0 @@
1
- # Version generated by setuptools_scm
2
- src/bootstrap3/_version.py
3
-
4
- # Python
5
- *.py[cod]
6
-
7
- # C extensions
8
- *.so
9
-
10
- # Packages
11
- .eggs
12
- *.egg
13
- *.egg-info
14
- dist
15
- build
16
- eggs
17
- parts
18
- bin
19
- var
20
- sdist
21
- develop-eggs
22
- .installed.cfg
23
- lib
24
- lib64
25
- pip-wheel-metadata/
26
-
27
- # Installer logs
28
- pip-log.txt
29
- *.log
30
-
31
- # Unit test / coverage reports
32
- htmlcov/
33
- .tox/
34
- .coverage
35
- .coverage.*
36
- .cache
37
- nosetests.xml
38
- coverage.xml
39
- *,cover
40
-
41
- # Translations
42
- *.mo
43
- *.pot
44
-
45
- # Mr Developer
46
- .mr.developer.cfg
47
- .project
48
- .pydevproject
49
-
50
- # Complexity
51
- output/*.html
52
- output/*/index.html
53
-
54
- # Sphinx
55
- docs/_build
56
-
57
- # Pycharm
58
- .idea*
59
-
60
- # Django
61
- local_settings.py
62
-
63
- # pyenv
64
- .python-version
65
- reports
66
-
67
- # Example database
68
- example/db.sqlite3
@@ -1,3 +0,0 @@
1
- sphinx>=7.2.6
2
- sphinx-mdinclude>=0.5.3
3
- furo>=2023.05.20
@@ -1,6 +0,0 @@
1
- -r requirements-test.txt
2
- -r docs/requirements.txt
3
- twine==5.0.0
4
- build==1.2.1
5
- setuptools==69.5.1
6
- setuptools-scm==8.0.4
@@ -1,3 +0,0 @@
1
- tox==4.14.2
2
- coverage==7.4.4
3
- ruff==0.3.7