Skip to content

Conversation

@SunilMohanAdapa
Copy link
Contributor

  • In Django 4.0, widget CheckboxSelectMultiple is a sub-class of RadioSelect
    causing the former to be rendered as the latter. Fix this by improving the
    check.

  • Versions of Django < 3.2 are no longer supported[1]. Drop support for them.
    Continue to support Django 2.2 has this is the version in current Debian
    stable (and requires no special handling).

  • Versions of Python < 3.7 are no longer supported[2]. Drop support for them.

  • Remove comments and code referring to older versions for simpler code.

Links:

  1. Django Supported Version: https://www.djangoproject.com/download/

  2. Python Supported Versions:
    https://devguide.python.org/#status-of-python-branches

'admin' app in later versions of Django requires 'messages' middleware and not
included that fails tests.

Signed-off-by: Sunil Mohan Adapa <[email protected]>
- In Django 4.0, widget CheckboxSelectMultiple is a sub-class of RadioSelect
causing the former to be rendered as the latter. Fix this by improving the
check.

- Versions of Django < 3.2 are no longer supported[1]. Drop support for them.
Continue to support Django 2.2 has this is the version in current Debian
stable (and requires no special handling).

- Versions of Python < 3.7 are no longer supported[2]. Drop support for them.

- Remove comments and code referring to older versions for simpler code.

Links:

1) Django Supported Version: https://www.djangoproject.com/download/

2) Python Supported Versions:
https://devguide.python.org/#status-of-python-branches

Signed-off-by: Sunil Mohan Adapa <[email protected]>
jvalleroy pushed a commit to freedombox/FreedomBox that referenced this pull request Jul 5, 2022
Closes: #2228.

- Django 4.0 changed to using <div> instead of using <ul> and <li> for multiple
choice select fields. Update code for the select-all button to work with the new
HTML structure.

- Add styling to ensure that multiple choice select field appears similar to
previous <ul> and <li> based style.

- This patch assumes that django-bootstrap-form has support for Django 4.0 as
seen in tzangms/django-bootstrap-form#110 .

Tests:

- Radio select seem to have no issues. Checked in networks -> connection type
page.

- Open Backups -> Create backup page and ensure that select all button works
and appears same on testing (Django 3.2) and unstable (Django 4.0).

Signed-off-by: Sunil Mohan Adapa <[email protected]>
Reviewed-by: James Valleroy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant