Skip to content

Commit 1a5dad1

Browse files
committed
bug fixing
1 parent 26870b1 commit 1a5dad1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

django_comments/django_comments/views.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def getComments(request):
4848
"post_id": obj.post_id,
4949
}
5050
comments.append(commentCurr)
51-
return comments
51+
print comments
52+
return render_to_response('index.html',comments)
5253

5354

django_comments/templates/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}">
33

44
<div id="content"></div>
5+
<script src="http://code.jquery.com/jquery-1.10.0.min.js"></script>
56
<script type="text/jsx">
67
/** @jsx React.DOM */
78
var CommentBox = React.createClass({
@@ -15,10 +16,11 @@
1516
success : function(data) {
1617
console.log('in - '+ data);
1718
this.setState({data: data});
19+
console.log('data - '+ data);
1820
}.bind(this),
1921
error : function(xhr, status, err) {
2022
console.log('out');
21-
console.error('', status, err.toString());
23+
console.error(' ', status, err);
2224
}.bind(this)
2325
});
2426
},
@@ -114,5 +116,4 @@ <h1>Comments</h1>
114116
</script>
115117
<script src="http://fb.me/react-0.11.1.js"></script>
116118
<script src="http://fb.me/JSXTransformer-0.11.1.js"></script>
117-
<script src="http://code.jquery.com/jquery-1.10.0.min.js"></script>
118119
<script src="http://cdnjs.cloudflare.com/ajax/libs/showdown/0.3.1/showdown.min.js"></script>

0 commit comments

Comments
 (0)