TestChildInlineFormset   A
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 4
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
c 0
b 0
f 0
dl 0
loc 4
rs 10
1
from crudbuilder.abstract import BaseCrudBuilder
2
from crudbuilder.formset import BaseInlineFormset
3
from crudbuilder.tests.models import TestModel, TestChildModel
4
5
6
class TestChildInlineFormset(BaseInlineFormset):
7
    inline_model = TestChildModel
8
    parent_model = TestModel
9
    exclude = ['created_by', 'updated_by']
10
11
12
class TestModelCrud(BaseCrudBuilder):
13
    model = TestModel
14
    search_fields = ['name']
15
    tables2_fields = ('name', 'email')
16
    tables2_css_class = "table table-bordered table-condensed"
17
    tables2_pagination = 20  # default is 10
18
    modelform_excludes = ['created_by']
19