Skip to content

Commit

Permalink
Merge pull request #3211 from Uninett/cleanup/finally-remove-crispy-f…
Browse files Browse the repository at this point in the history
…orms

Remove `crispy-forms-foundation` and `django-crispy-forms` from requirements
  • Loading branch information
johannaengland authored Nov 22, 2024
2 parents 6f508a6 + 05a6651 commit 74edff4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
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

0 comments on commit 74edff4

Please sign in to comment.