We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5057b4b commit 1b6b760Copy full SHA for 1b6b760
1 file changed
dojo/forms.py
@@ -324,6 +324,17 @@ class Meta:
324
model = Test_Type
325
exclude = ["dynamically_generated"]
326
327
+ def __init__(self, *args, **kwargs):
328
+ super().__init__(*args, **kwargs)
329
+
330
+ if self.instance.pk:
331
+ self.fields["name"].widget.attrs["readonly"] = True
332
333
+ def clean_name(self):
334
335
+ return self.instance.name
336
+ return self.cleaned_data["name"]
337
338
339
class Development_EnvironmentForm(forms.ModelForm):
340
class Meta:
0 commit comments