Introduce ObjectAttribute for displaying read-only instance attributes on forms

This commit is contained in:
Jeremy Stretch
2024-03-13 10:15:34 -04:00
parent 33b9ebb201
commit 8f03a19b5f
12 changed files with 40 additions and 78 deletions

View File

@@ -759,7 +759,6 @@ class ImageAttachmentListView(generic.ObjectListView):
class ImageAttachmentEditView(generic.ObjectEditView):
queryset = ImageAttachment.objects.all()
form = forms.ImageAttachmentForm
template_name = 'extras/imageattachment_edit.html'
def alter_object(self, instance, request, args, kwargs):
if not instance.pk: