File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 12
12
)
13
13
14
14
15
+ COMMENTS_FOR_CONCRETE_MODEL = \
16
+ getattr (settings , 'COMMENTS_FOR_CONCRETE_MODEL' , True )
17
+
18
+
15
19
XtdComment = get_comment_model ()
16
20
17
21
@@ -59,7 +63,9 @@ def _reverse(*args, **kwargs):
59
63
return reverse (* args , ** kwargs )
60
64
61
65
form = CommentSecurityForm (obj )
62
- ctype = ContentType .objects .get_for_model (obj )
66
+ ctype = ContentType .objects .get_for_model (
67
+ obj , for_concrete_model = COMMENTS_FOR_CONCRETE_MODEL ,
68
+ )
63
69
queryset = XtdComment .objects .filter (content_type = ctype ,
64
70
object_pk = obj ._get_pk_val (),
65
71
site__pk = get_current_site_id (request ),
Original file line number Diff line number Diff line change @@ -220,6 +220,10 @@ def get_comment_dict(obj):
220
220
return dic_list
221
221
222
222
223
+ XtdComment .content_object .for_concrete_model = \
224
+ getattr (settings , 'COMMENTS_FOR_CONCRETE_MODEL' , True )
225
+
226
+
223
227
def publish_or_unpublish_nested_comments (comment , are_public = False ):
224
228
qs = get_model ().norel_objects .filter (~ Q (pk = comment .id ),
225
229
parent_id = comment .id )
You can’t perform that action at this time.
0 commit comments