2
2
from django .conf import settings
3
3
4
4
from utilities .tables import (
5
- BaseTable , BooleanColumn , ButtonsColumn , ChoiceFieldColumn , ColorColumn , ContentTypeColumn , ToggleColumn ,
5
+ BaseTable , BooleanColumn , ButtonsColumn , ChoiceFieldColumn , ColorColumn , ContentTypeColumn , ContentTypesColumn ,
6
+ ToggleColumn ,
6
7
)
7
8
from .models import *
8
9
@@ -37,14 +38,16 @@ class CustomFieldTable(BaseTable):
37
38
name = tables .Column (
38
39
linkify = True
39
40
)
41
+ content_types = ContentTypesColumn ()
40
42
required = BooleanColumn ()
41
43
42
44
class Meta (BaseTable .Meta ):
43
45
model = CustomField
44
46
fields = (
45
- 'pk' , 'name' , 'label' , 'type' , 'required' , 'weight' , 'default' , 'description' , 'filter_logic' , 'choices' ,
47
+ 'pk' , 'name' , 'content_types' , 'label' , 'type' , 'required' , 'weight' , 'default' , 'description' ,
48
+ 'filter_logic' , 'choices' ,
46
49
)
47
- default_columns = ('pk' , 'name' , 'label' , 'type' , 'required' , 'description' )
50
+ default_columns = ('pk' , 'name' , 'content_types' , ' label' , 'type' , 'required' , 'description' )
48
51
49
52
50
53
#
@@ -98,6 +101,7 @@ class WebhookTable(BaseTable):
98
101
name = tables .Column (
99
102
linkify = True
100
103
)
104
+ content_types = ContentTypesColumn ()
101
105
enabled = BooleanColumn ()
102
106
type_create = BooleanColumn ()
103
107
type_update = BooleanColumn ()
@@ -106,11 +110,12 @@ class WebhookTable(BaseTable):
106
110
class Meta (BaseTable .Meta ):
107
111
model = Webhook
108
112
fields = (
109
- 'pk' , 'name' , 'enabled' , 'type_create' , 'type_update' , 'type_delete' , 'http_method' , 'payload_url ' ,
110
- 'secret' , 'ssl_validation' , 'ca_file_path' ,
113
+ 'pk' , 'name' , 'content_types' , ' enabled' , 'type_create' , 'type_update' , 'type_delete' , 'http_method' ,
114
+ 'payload_url' , ' secret' , 'ssl_validation' , 'ca_file_path' ,
111
115
)
112
116
default_columns = (
113
- 'pk' , 'name' , 'enabled' , 'type_create' , 'type_update' , 'type_delete' , 'http_method' , 'payload_url' ,
117
+ 'pk' , 'name' , 'content_types' , 'enabled' , 'type_create' , 'type_update' , 'type_delete' , 'http_method' ,
118
+ 'payload_url' ,
114
119
)
115
120
116
121
0 commit comments