-
Notifications
You must be signed in to change notification settings - Fork 37
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
Get rid of crispy-forms #2794
Comments
There exists no official guide to upgrading from Foundation 5 to 6. Here's an unofficial one from 2016: Updating to Zurb Foundation 6, not. |
If it is only the forms that use Foundation, we could just switch to a different theme in crispy-forms. We need to find out where and how Foundation is being used. |
Direct use in python:
|
Usage in javascript. Number is count of times foundation is mentioned in the file, comments excluded.
Noe that the datatables we use seems to depend on Foundation as well. |
Usage in html,
|
crispy-forms needs to be upgraded to work with Django 4.2. This is a breeze.
Unfortunately, we also use crispy-forms-foundation, and newer crispy-forms-foundation needs Foundation 6. NAV is written to use Foundation 5.
This means either upgrading Foundation to 6 or replace Foundation 5 with something else or forking crispy-forms-foundation to work with foundation 5.
Rather than follow the house-of-cards-style upgrade path, we should instead look into throwing out crispy-forms entirely and replacing it with form templates in pure Django.
Initial work
Form classes that use crispy-forms
FormHelper
:These form classes have been identified as using crispy-forms
FormHelper
in some way, through Python code. Whether they are rendered using crispy-forms template tags has not been verified.These could individually be altered into issues and self-assigned, or they could easily be grouped as one issue per file, if so desired.
#2981 can be used as a template, of sorts, that shows in a step-wise fashion how a conversion can be achieved.
nav.web.styleguide
python/nav/web/styleguide.py:StyleFormTwo
(this is more than just changing it, since the styleguide refers to us using crispyforms, so the content also needs to be changed)nav.web.alertprofiles
AlertProfileForm
in alert profiles #2999python/nav/web/alertprofiles/forms.py:AlertAddressForm
python/nav/web/alertprofiles/forms.py:TimePeriodForm
python/nav/web/alertprofiles/forms.py:AlertSubscriptionForm
python/nav/web/alertprofiles/forms.py:FilterGroupForm
python/nav/web/alertprofiles/forms.py:FilterForm
python/nav/web/alertprofiles/forms.py:MatchFieldForm
nav.web.arnold
python/nav/web/arnold/forms.py:JustificationForm
python/nav/web/arnold/forms.py:QuarantineVlanForm
python/nav/web/arnold/forms.py:SearchForm
python/nav/web/arnold/forms.py:DetentionProfileForm
python/nav/web/arnold/forms.py:ManualDetentionTargetForm
python/nav/web/arnold/forms.py:ManualDetentionForm
nav.web.devicehistory
python/nav/web/devicehistory/forms.py:DeviceHistoryViewFilter
nav.web.info
python/nav/web/info/forms.py:SearchForm
nav.web.ipdevinfo
python/nav/web/ipdevinfo/forms.py:SearchForm
python/nav/web/ipdevinfo/forms.py:ActivityIntervalForm
python/nav/web/ipdevinfo/forms.py:BooleanSensorForm
nav.web.l2trace
python/nav/web/l2trace/forms.py:L2TraceForm
nav.web.macwatch
python/nav/web/macwatch/forms.py:MacWatchForm
nav.web.maintenance
python/nav/web/maintenance/forms.py:MaintenanceTaskForm
nav.web.messages
python/nav/web/messages/forms.py:MessageForm
nav.web.navlets
python/nav/web/navlets/forms.py:AlertWidgetForm
nav.web.portadmin
python/nav/web/portadmin/forms.py:SearchForm
nav.web.radius
python/nav/web/radius/forms.py:ErrorLogSearchForm
python/nav/web/radius/forms.py:AccountLogSearchForm
python/nav/web/radius/forms.py:AccountChartsForm
nav.web.seeddb.forms
nav.web.seeddb.forms:OrganizationFilterForm
#2984nav.web.seeddb.forms.NetboxTypeFilterForm
#2986python/nav/web/seeddb/forms/__init__.py:DeviceGroupForm
nav.web.seeddb.page.vlan
python/nav/web/seeddb/page/vlan.py:VlanFilterForm
nav.web.seeddb.page.management_profile
python/nav/web/seeddb/page/management_profile/forms.py:ManagementProfileFilterForm
nav.web.seeddb.page.netbox
python/nav/web/seeddb/page/netbox/forms.py:NetboxModelForm
python/nav/web/seeddb/page/netbox/forms.py:NetboxFilterForm
nav.web.sortedstats
python/nav/web/sortedstats/forms.py:ViewForm
nav.web.status2
python/nav/web/status2/forms.py:StatusPanelForm
python/nav/web/status2/forms.py:StatusWidgetForm
nav.web.syslogger
python/nav/web/syslogger/forms.py:LoggerGroupSearchForm
nav.web.threshold
python/nav/web/threshold/forms.py:ThresholdForm
nav.web.useradmin
python/nav/web/useradmin/forms.py:AccountGroupForm
python/nav/web/useradmin/forms.py:AccountForm
python/nav/web/useradmin/forms.py:PrivilegeForm
python/nav/web/useradmin/forms.py:OrganizationAddForm
python/nav/web/useradmin/forms.py:GroupAddForm
python/nav/web/useradmin/forms.py:AccountAddForm
python/nav/web/useradmin/forms.py:TokenForm
nav.web.webfront
python/nav/web/webfront/forms.py:LoginForm
python/nav/web/webfront/forms.py:NavbarlinkForm
python/nav/web/webfront/forms.py:ChangePasswordForm
python/nav/web/webfront/forms.py:ColumnsForm
Forms that are otherwise rendered through crispy-forms template tags
None have been identified thus far (but their existence cannot be precluded)
The text was updated successfully, but these errors were encountered: