1

I am struggling how to submit multiple the same forms in one page. I have 3 model classes:

  1. Group_attribut
  2. Attribute
  3. Attribut_items

I create this form:

from django import forms
from .models import Attribute, Attribute_Item


class GroupAttrForm(forms.ModelForm):
    class Meta:
        model = Group_attribute
        fields = ('title', 'catId', 'slug', 'display_order',)


class AttForm(forms.ModelForm):
    list = forms.ModelMultipleChoiceField(
        queryset=Attribute_Item.objects.all(),
        label='items list'
    )

    class Meta:
        model = Attribute
        fields = ('title', 'type', 'slug', 'group_attributeId',)

I want to use this form while creating Group_attribut - with on click save the group and its Attributes with their all Attribut_items - page is something like: https://i.sstatic.net/0OX5B.jpg

please help me

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.