# models.py from djangoplus.cross_table import CrossTableManager class Division(models.Model): item = models.ForeignKey(Item) customer = models.ForeignKey(Customer) quantity = models.DecimalField(max_digits=6, decimal_places=1) objects = CrossTableManager() #------------------------ # forms.py from djangoplus.cross_table import CrossTableForm class FormDivision(CrossTableForm): class Meta: model = Division x_model = Item y_model = Customer x_field = 'item' y_field = 'customer' class InfoFields: # Additional fields product_name = forms.Field(required=False, widget=forms.TextInput) class CrossFields: quantity = forms.Field(required=False, widget=forms.TextInput) # views.py formcross_division = FormDivision( x_values=Item.objects.all(), y_values=Customer.objects.all(), queryset=Division.objects.all(), ) # template
{{ formcross_dividida.media }}