File tree Expand file tree Collapse file tree 2 files changed +3
-14
lines changed Expand file tree Collapse file tree 2 files changed +3
-14
lines changed Original file line number Diff line number Diff line change 6
6
/** @jsx React.DOM */
7
7
var CommentBox = React . createClass ( {
8
8
getInitialState : function ( ) {
9
- // $.ajax({
10
- // url : "getcomments/",
11
- // type : "POST",
12
- // success : function(data) {
13
- // console.log('success - '+ JSON.stringify(data));
14
- // return data;
15
- // },
16
- // error : function(xhr,errmsg,err) {
17
- // console.log('err');
18
- // console.log(xhr.status + ": " + xhr.responseText);
19
- // return {data: []};
20
- // }
21
- // });
22
9
return { data : [ ] } ;
23
10
} ,
24
11
loadCommentsFromServer : function ( ) {
Original file line number Diff line number Diff line change @@ -47,9 +47,11 @@ def getComments(request):
47
47
data = Comments .objects .all ()
48
48
comments = []
49
49
for obj in data :
50
+ obj_comment = obj .comment
51
+ obj_comment_refined = obj_comment .replace ("+" , " " );
50
52
commentCurr = {
51
53
"author" : obj .user_id ,
52
- "text" : obj . comment ,
54
+ "text" : obj_comment_refined ,
53
55
"post_id" : obj .post_id ,
54
56
}
55
57
comments .append (commentCurr )
You can’t perform that action at this time.
0 commit comments