8000 README.md file updated. · moktadirul-raju/DjangoBlog@e111864 · GitHub
[go: up one dir, main page]

Skip to content

Commit e111864

Browse files
committed
README.md file updated.
1 parent 88cb752 commit e111864

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<ul>
66
<li> <strong> Project Name:</strong> Django Blog </li>
77
<li> <strong> Description:</strong> Simple blog app using Django</li>
8-
<li> <strong> Version:</strong> v1.0</li>
8+
<li> <strong> Version:</strong> v1.0.1</li>
99
<li> <strong> Author:</strong> xHacker404 </li>
1010
<li> <strong> Demo:</strong> <a href="http://xhacker404.pythonanywhere.com/" target="_self">DjangoBlog </a></li>
1111
</ul>

db.sqlite3

0 Bytes
Binary file not shown.

templates/blog/base.html

+4-2
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,11 @@ <h2>Tags</h2>
149149
$(".reply").on("click", function(e){
150150

151151
var target = $( e.target );
152-
153152
$(target).siblings(".reply-form").show();
154-
$(target).hide();
153+
if(target.value()=="Reply"){
154+
$(target).hide();
155+
}
156+
155157

156158

157159
});

templates/blog/single.html

+16-4
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ <h2 style="font-size: 20px">{{comment.author.user}}</h2>
102102
<h2 style="font-size:20px">{{reply.author.user}}</h2>
103103
<p>{{ reply.title}} </p>
104104
{% if forloop.last %}
105+
{% if user.is_authenticated %}
105106
<form action="{% url 'blog:submit_reply'%}" method="POST">
106107
{% csrf_token %}
107108

@@ -113,12 +114,23 @@ <h2 style="font-size:20px">{{reply.author.user}}</h2>
113114
<textarea class="form-control" id="comment-box" rows="3" name="reply_content"></textarea>
114115

115116
</div>
116-
{% if user.is_authenticated %}
117117
<button type="submit" class="btn btn-primary">Reply</button>
118-
{% else %} <!-- have to work here -->
119-
<button type="submit" class="btn btn-primary" onclick="login_alert()">Reply</button>
120-
{% endif %}
121118
</form>
119+
{% else %}
120+
<form action="#" method="POST">
121+
{% csrf_token %}
122+
123+
<div class="form-group">
124+
125+
<input type="text" name='reply_title'>
126+
<textarea class="form-control" id="comment-box" rows="3" name="reply_content"></textarea>
127+
128+
</div>
129+
<button type="submit" class="btn btn-primary" onclick="login_alert()">Reply</button>
130+
612B </form>
131+
132+
{% endif %}
133+
122134
{% endif %}
123135
</div>
124136

0 commit comments

Comments
 (0)
0