Skip to content

Commit

Permalink
Remove "crispy forms" integration (#8684)
Browse files Browse the repository at this point in the history
* Remove "crispy forms" integration

- No longer doing any back-end form rendering

* Remove django-formtools package

* Fix comment in settings.py

---------

Co-authored-by: Matthias Mair <[email protected]>
  • Loading branch information
SchrodingersGat and matmair authored Dec 17, 2024
1 parent 886d1b3 commit 9f1d1ab
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
6 changes: 1 addition & 5 deletions src/backend/InvenTree/InvenTree/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@
'django_filters', # Extended filter functionality
'rest_framework', # DRF (Django Rest Framework)
'corsheaders', # Cross-origin Resource Sharing for DRF
'crispy_forms', # Improved form rendering
'import_export', # Import / export tables to file
'django_cleanup.apps.CleanupConfig', # Automatically delete orphaned MEDIA files
'mptt', # Modified Preorder Tree Traversal
Expand All @@ -291,7 +290,6 @@
'djmoney.contrib.exchange', # django-money exchange rates
'error_report', # Error reporting in the admin interface
'django_q',
'formtools', # Form wizard tools
'dbbackup', # Backups - django-dbbackup
'taggit', # Tagging
'flags', # Flagging - django-flags
Expand Down Expand Up @@ -1054,9 +1052,6 @@

DATE_INPUT_FORMATS = ['%Y-%m-%d']

# crispy forms use the bootstrap templates
CRISPY_TEMPLATE_PACK = 'bootstrap4'

# Use database transactions when importing / exporting data
IMPORT_EXPORT_USE_TRANSACTIONS = True

Expand Down Expand Up @@ -1321,6 +1316,7 @@
'reset_password_from_key': 'allauth.account.forms.ResetPasswordKeyForm',
'disconnect': 'allauth.socialaccount.forms.DisconnectForm',
}

ALLAUTH_2FA_FORMS = {'setup': 'InvenTree.auth_overrides.CustomTOTPDeviceForm'}
# Determine if multi-factor authentication is enabled for this server (default = True)
MFA_ENABLED = get_boolean_setting('INVENTREE_MFA_ENABLED', 'mfa_enabled', True)
Expand Down
2 changes: 0 additions & 2 deletions src/backend/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ django-allauth[openid,saml] # SSO for external providers via OpenI
django-allauth-2fa # MFA / 2FA
django-cleanup # Automated deletion of old / unused uploaded files
django-cors-headers # CORS headers extension for DRF
django-crispy-forms<2.0 # Form helpers # FIXED 2023-02-18 due to required updates in the new version
django-dbbackup # Backup / restore of database and media files
django-error-report-2 # Error report viewer for the admin interface
django-filter # Extended filtering options
django-flags # Feature flags
django-formtools # Form wizard tools
django-ical # iCal export for calendar views
django-import-export<4.0 # Data import / export for admin interface # FIXED 2024-06-26 see https://github.com/inventree/InvenTree/pull/7521
django-maintenance-mode # Shut down application while reloading etc.
Expand Down
9 changes: 0 additions & 9 deletions src/backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,6 @@ django==4.2.17 \
# django-error-report-2
# django-filter
# django-flags
# django-formtools
# django-ical
# django-import-export
# django-js-asset
Expand Down Expand Up @@ -454,10 +453,6 @@ django-cors-headers==4.6.0 \
--hash=sha256:14d76b4b4c8d39375baeddd89e4f08899051eeaf177cb02a29bd6eae8cf63aa8 \
--hash=sha256:8edbc0497e611c24d5150e0055d3b178c6534b8ed826fb6f53b21c63f5d48ba3
# via -r src/backend/requirements.in
django-crispy-forms==1.14.0 \
--hash=sha256:35887b8851a931374dd697207a8f56c57a9c5cb9dbf0b9fa54314da5666cea5b \
--hash=sha256:bc4d2037f6de602d39c0bc452ac3029d1f5d65e88458872cc4dbc01c3a400604
# via -r src/backend/requirements.in
django-dbbackup==4.2.1 \
--hash=sha256:157a2ec10d482345cd75092e510ac40d6e2ee6084604a1d17abe178c2f06bc69 \
--hash=sha256:b23265600ead0780ca781b1b4b594949aaa8a20d74f08701f91ee9d7eb1f08cd
Expand All @@ -474,10 +469,6 @@ django-flags==5.0.13 \
--hash=sha256:52df74b86d93f5cb402190ad26b68a5ba0f127e9e016189f1a6f2e8ba3c06a42 \
--hash=sha256:ff6940cf37e07d6d0c4ac28c5420c8cfc478b62541473dba4aa02d600f7db9fc
# via -r src/backend/requirements.in
django-formtools==2.5.1 \
--hash=sha256:47cb34552c6efca088863d693284d04fc36eaaf350eb21e1a1d935e0df523c93 \
--hash=sha256:bce9b64eda52cc1eef6961cc649cf75aacd1a707c2fff08d6c3efcbc8e7e761a
# via -r src/backend/requirements.in
django-ical==1.9.2 \
--hash=sha256:44c9b6fa90d09f25e9ebaa91ed9eb007f079afbc23d6aac909cfc18188a8e90c \
--hash=sha256:74a16bca05735f91a00120cad7250f3c3aa292a9f698a6cfdc544a922c11de70
Expand Down

0 comments on commit 9f1d1ab

Please sign in to comment.