8000 safe filter added to content · moktadirul-raju/DjangoBlog@3220cab · GitHub
[go: up one dir, main page]

Skip to content

Commit 3220cab

Browse files
committed
safe filter added to content
1 parent c3778b5 commit 3220cab

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

db.sqlite3

0 Bytes
Binary file not shown.

templates/backend/posts.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@
7373
{% csrf_token %}
7474
<div class="form-group">
7575

76-
<label for="post-title">Post Title:</label>
76+
<label for="post-title">Title:</label>
7777
<input type="text" id="post-title" class="form-control" name="post_title" value="">
7878

7979
</div>
8080

8181
<div class="form-group">
82-
<label for="summernote">Post Content:</label>
82+
<label for="summernote">Content:</label>
8383
<textarea class="form-control" rows="6" id="summernote" name="post_content">
8484

8585
</textarea>
@@ -146,13 +146,13 @@ <h5>Tags:</h5>
146146

147147
<div class="form-group">
148148
<input type="hidden" name="post_id" value="{{post.id}}" >
149-
<label for="post-title">Post Title:</label>
149+
<label for="post-title">Title:</label>
150150
<input type="text" name="post_title" id="post-title" class="form-control" value="{{post.title}}">
151151

152152
</div>
153153

154154
<div class="form-group">
155-
<label for="content">Post Content:</label>
155+
<label for="content">Content:</label>
156156
<textarea name="post_content" class="form-control" id="summernote" rows="6">
157157
{{post.content}}
158158
</textarea>

templates/blog/archeive.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ <h2><a href="/blog/posts/{{post.id}}"> {{ post.title}} </a></h2>
1313
</ul>
1414
<hr>
1515
<img src="/media/{{post.featured_img}}" alt="{{post.title}}" width="600px" height="400px" align="center"/></br>
16-
<p>{{post.content}}</p>
16+
<p>{{post.content | safe }}</p>
1717

1818
<button class="btn"><a href="/blog/posts/{{post.id}}">Read More</a></button>
1919

0 commit comments

Comments
 (0)
0