79398756

Date: 2025-01-30 04:12:28
Score: 0.5
Natty:
Report link

The correct way is to set read-only in the Form class, in this case the example code could be:

class ExampleForm(BaseForm):
    name = forms.CharField(label=_('Name'), required=True, widget=forms.TextInput(attrs={'readonly': 'readonly'}))
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: FedeG