-
Notifications
You must be signed in to change notification settings - Fork 39
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,
|
All tasks have been closed and the crispy-dependencies completely removed. It seems we are finally at the end of this. I guess the next step is start testing on Django 4.12 😄 |
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.
CSS-classes that are not in use, can safely be removed
Other things that can be removed
form_show_errors
is a template variable that is never set in context, so removableInitial 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.
#2994 can be used as a template for most input fields in edit- and add-forms, and introduces additional pattern - conversion of required fields.
#3000 introduces a reusable uncrispyfied
field
template.#3008 introduces reusable uncrispyfied templates for
CheckBox()
andHelpField()
.nav.web.styleguide
StyleFormTwo
in styleguide #3179nav.web.alertprofiles
AlertProfileForm
in alert profiles #2999python/nav/web/alertprofiles/forms.py:AlertAddressForm
#3076python/nav/web/alertprofiles/forms.py:TimePeriodForm
#3081nav.web.alertprofiles.forms.AlertSubscriptionForm
#3053python/nav/web/alertprofiles/forms.py:FilterGroupForm
#3085python/nav/web/alertprofiles/forms.py:FilterForm
#3083nav.web.alertprofiles.forms.MatchFieldForm
#3054When all Alertprofile forms that use
base_detail.html
(most of them) are done, then #3075 can be donenav.web.arnold
nav.web.arnold.forms.JustificationForm
#3032python/nav/web/arnold/forms.py:QuarantineVlanForm
#3163python/nav/web/arnold/forms.py:SearchForm
#3172python/nav/web/arnold/forms.py:DetentionProfileForm
#3174python/nav/web/arnold/forms.py:ManualDetentionTargetForm
#3165python/nav/web/arnold/forms.py:ManualDetentionForm
#3170nav.web.devicehistory
nav.web.devicehistory.forms.DeviceHistoryViewFilter
#3003nav.web.info
nav.web.info.forms.SearchForm
#3027nav.web.ipdevinfo
SearchForm
in ipdevinfo #3096ActivityIntervalForm
in ipdevinfo #3060BooleanSensorForm
in ipdevinfo #3093nav.web.l2trace
python/nav/web/l2trace/forms.py:L2TraceForm
#3120nav.web.macwatch
python/nav/web/macwatch/forms.py:MacWatchForm
#3109nav.web.maintenance
python/nav/web/maintenance/forms.py:MaintenanceTaskForm
#3116nav.web.messages
python/nav/web/messages/forms.py:MessageForm
#3112nav.web.navlets
nav.web.navlets.forms.AlertWidgetForm
#3031nav.web.portadmin
python/nav/web/portadmin/forms.py:SearchForm
#3111nav.web.radius
python/nav/web/radius/forms.py:ErrorLogSearchForm
#3123python/nav/web/radius/forms.py:AccountLogSearchForm
#3124python/nav/web/radius/forms.py:AccountChartsForm
#3125nav.web.seeddb.forms
nav.web.seeddb.forms:OrganizationFilterForm
#2984nav.web.seeddb.forms.NetboxTypeFilterForm
#2986python/nav/web/seeddb/forms/__init__.py:DeviceGroupForm
#2988nav.web.seeddb.page.vlan
python/nav/web/seeddb/page/vlan.py:VlanFilterForm
#2991nav.web.seeddb.page.management_profile
ManagementProfileFilterForm
in SeedDB #3061nav.web.seeddb.page.netbox
python/nav/web/seeddb/page/netbox/forms.py:NetboxModelForm
#3068NetboxFilterForm
in seedDB #3062nav.web.sortedstats
ViewForm
in sortedstats #3063nav.web.status2
nav.web.status2.forms.StatusPanelForm
#3037StatusWidgetForm
#3133nav.web.syslogger
python/nav/web/syslogger/forms.py:LoggerGroupSearchForm
#3101nav.web.threshold
nav.web.threshold.forms.ThresholdForm
#3050nav.web.useradmin
AccountGroupForm
in useradmin #3134AccountForm
in useradmin #3135PrivilegeForm
in useradmin #3151OrganizationAddForm
in useradmin #3152GroupAddForm
in useradmin #3155AccountAddForm
in useradmin #3030TokenForm
in useradmin #3156nav.web.webfront
python/nav/web/webfront/forms.py:LoginForm
#3087python/nav/web/webfront/forms.py:NavbarlinkForm
#3099python/nav/web/webfront/forms.py:ChangePasswordForm
#3089python/nav/web/webfront/forms.py:ColumnsForm
#3100Forms that are otherwise rendered through crispy-forms template tags
/sedddb
#2996Other issues that have to do with removing crispy-forms
crispy-forms-foundation
anddjango-crispy-forms
from requirements #3211None other have been identified thus far (but their existence cannot be precluded)
The text was updated successfully, but these errors were encountered: