Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove crispy-forms-foundation and django-crispy-forms from requirements #3211

Merged
merged 5 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions NOTES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ existing bug reports, go to https://github.com/uninett/nav/issues .
To see an overview of upcoming release milestones and the issues they resolve,
please go to https://github.com/uninett/nav/milestones .

Unreleased
==========

Dependency changes
------------------

These Python modules are no longer required due to us rewriting forms in order
to be able to upgrade to Python 3.11:

* :mod:`django-crispy-forms`
* :mod:`crispy-forms-foundation`

NAV 5.11
========

Expand Down
1 change: 1 addition & 0 deletions changelog.d/2794.removed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Removed dependencies django-crispy-forms and crispy-forms-foundation
4 changes: 0 additions & 4 deletions python/nav/django/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,6 @@
'nav.web.navlets.env_rack.EnvironmentRackWidget',
)

CRISPY_ALLOWED_TEMPLATE_PACKS = 'foundation-5'
CRISPY_TEMPLATE_PACK = 'foundation-5'

INSTALLED_APPS = (
'nav.models',
Expand All @@ -222,8 +220,6 @@
'django.contrib.sessions',
'django.contrib.humanize',
'django_filters',
'crispy_forms',
'crispy_forms_foundation',
'rest_framework',
'nav.auditlog',
'nav.web.macwatch',
Expand Down
5 changes: 1 addition & 4 deletions python/nav/web/crispyforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# more details. You should have received a copy of the GNU General Public
# License along with NAV. If not, see <http://www.gnu.org/licenses/>.
#
"""A collection of forms using the django crispy forms framework"""
"""A collection of forms inspired by the django crispy forms framework"""
from types import SimpleNamespace
from typing import Optional

Expand Down Expand Up @@ -56,9 +56,6 @@ class NumberField(forms.IntegerField):
widget = NumberInput


# For uncrispyfied forms:


class FlatFieldset:
"""A class representing a fieldset for forms.
Only flat layout of children fields is supported out of the box.
Expand Down
2 changes: 0 additions & 2 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ dnspython<3.0.0,>=2.1.0

django-filter>=2
djangorestframework>=3.12,<3.13
django-crispy-forms>=1.8,<1.9
crispy-forms-foundation>=0.7,<0.8

# REST framework
iso8601
Expand Down
Loading