You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used Django render_field method to return a form design of formset.
I know that there a method to get tabular design of form set by using self.helper.template='crispy-tabuler-page' but this method gives all fields of formsets and ignore all design in self.helper.layout
so I used render_field method to get html design of formset in the view.
the problem is Django Version: 3.2 Exception Type: TypeError Exception Value: list indices must be integers or slices, not str Exception Location: C:\0ERPFlex\ERPFlex_venv\lib\site-packages\django\forms\formsets.py, line 96, in __getitem__ Python Executable: C:\0ERPFlex\ERPFlex_venv\Scripts\python.exe Python Version: 3.7.6
I make this fixed in the method render_fields : if hasattr(form,'forms'): form=form.forms[0]
and the problem was solved but I want a this fixed in the next version in render_fields
The text was updated successfully, but these errors were encountered:
Description:
I used Django render_field method to return a form design of formset.
I know that there a method to get tabular design of form set by using
self.helper.template='crispy-tabuler-page'
but this method gives all fields of formsets and ignore all design inself.helper.layout
so I used render_field method to get html design of formset in the view.
the problem is
Django Version: 3.2 Exception Type: TypeError Exception Value: list indices must be integers or slices, not str Exception Location: C:\0ERPFlex\ERPFlex_venv\lib\site-packages\django\forms\formsets.py, line 96, in __getitem__ Python Executable: C:\0ERPFlex\ERPFlex_venv\Scripts\python.exe Python Version: 3.7.6
I make this fixed in the method render_fields :
if hasattr(form,'forms'): form=form.forms[0]
and the problem was solved but I want a this fixed in the next version in render_fields
The text was updated successfully, but these errors were encountered: