File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 14
14
15
15
COMMENT_MAX_LENGTH = getattr (settings , 'COMMENT_MAX_LENGTH' , 3000 )
16
16
DEFAULT_COMMENTS_TIMEOUT = getattr (settings , 'COMMENTS_TIMEOUT' , (2 * 60 * 60 )) # 2h
17
+ COMMENTS_FOR_CONCRETE_MODEL = getattr (settings , 'COMMENTS_FOR_CONCRETE_MODEL' , True )
17
18
18
19
19
20
class CommentSecurityForm (forms .Form ):
@@ -138,7 +139,10 @@ def get_comment_create_data(self, site_id=None):
138
139
method to add extra fields onto a custom comment model.
139
140
"""
140
141
return dict (
141
- content_type = ContentType .objects .get_for_model (self .target_object ),
142
+ content_type = ContentType .objects .get_for_model (
143
+ self .target_object ,
144
+ for_concrete_model = COMMENTS_FOR_CONCRETE_MODEL ,
145
+ ),
142
146
object_pk = force_str (self .target_object ._get_pk_val ()),
143
147
user_name = self .cleaned_data ["name" ],
144
148
user_email = self .cleaned_data ["email" ],
You can’t perform that action at this time.
0 commit comments