Skip to content

Additional form field declared in subclass of EntangledModelForm does not work anymore #28

@AlexanderB-C

Description

@AlexanderB-C

My class DeliveryNoteLineItemForm(forms.ModelForm) already had a package_number = forms.CharField() additional field declared, which does not actually exist in the DeliveryNoteLineItem model.

It is used in the def form_valid(self, form): method of my generic.CreateView based class based view to do some custom logic before actually saving the new object to the database.

This field is not included in the form.cleaned_data dictionary anymore now that I switched the form class to inherit from EntangledModelForm, declared more additional form fields for use in entangled_fields, etc.

The package_number field is not included in the entangled_fields, so it should still be part of form.cleaned_data as a completely stand alone field in my opinion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions