-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makaleler için Güncelle ve sil özelliği eklendi. Arama butonu oluştur…
…uldu. Progenin son hali makalelerdeki <blog.py'im> adlı makaleye eklendi
- Loading branch information
canonka
committed
Mar 10, 2019
1 parent
e28c0dd
commit b0e81ad
Showing
8 changed files
with
284 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{% extends "layout.html" %} | ||
|
||
{% block body %} | ||
|
||
<h3>Makale Oluştur</h3> | ||
<hr> | ||
|
||
{% from "includes/formhelpers.html" import render_field %} | ||
|
||
<form method="post"> | ||
{{ render_field(form.title,class = "form-control") }} | ||
{{ render_field(form.content,class = "form-control") }} | ||
<button type="submit" class="btn btn-danger">Makale Ekle</button> | ||
</form> | ||
|
||
{% endblock body %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{% extends "layout.html" %} | ||
|
||
{% block body %} | ||
|
||
{% if article %} | ||
|
||
<h4>{{article.title}}</h4> | ||
<hr> | ||
Yazar : {{article.author}} | ||
<hr> | ||
Tarih : {{article.created_date}} | ||
<hr> | ||
İçerik : <br/> | ||
{{article.content|safe}} | ||
<hr> | ||
{% else %} | ||
<div class = "alert alert-warning"> | ||
Böyle bir makale bulunmuyor... | ||
</div> | ||
{% endif %} | ||
|
||
{% endblock body %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{% extends "layout.html" %} | ||
|
||
{% block body %} | ||
|
||
<h3>Makaleler</h3> | ||
<hr> | ||
|
||
{% if articles %} | ||
|
||
<form action="/search" method = "post"> | ||
|
||
<div class="search"> | ||
<input type="text" name = "keyword" class="input-sm" maxlength="64" placeholder="Ara..."> | ||
<button type="submit" class="btn btn-danger">Ara</button> | ||
</div> | ||
|
||
</form> | ||
<hr> | ||
|
||
<ul class="list-group"> | ||
{% for article in articles %} | ||
|
||
<li class="list-group-item"><a href="article/{{article.id}}">{{article.title}}</a></li> | ||
|
||
{% endfor %} | ||
|
||
</ul> | ||
|
||
{% else %} | ||
<div class = "alert alert-danger">Bu blogda henüz bir makale bulunmuyor.</div> | ||
{% endif %} | ||
|
||
{% endblock body %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{% extends "layout.html" %} | ||
|
||
{% block body %} | ||
<h3>Kontrol Paneli</h3> | ||
<small>Hoşgeldin, {{session["username"]}}</small> | ||
<hr> | ||
|
||
<a href="/addarticle" class = "btn btn-danger">Makale Ekle</a> | ||
|
||
{% if articles %} | ||
<table class="table table-hover"> | ||
<thead> | ||
<tr> | ||
<th scope="col">id</th> | ||
<th scope="col">Başlık</th> | ||
<th scope="col">Yazar</th> | ||
<th scope="col">Tarih</th> | ||
<th scope="col"></th> | ||
<th scope="col"></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for article in articles %} | ||
<tr> | ||
<th scope="row">{{article.id}}</th> | ||
<td><a href="/article/{{article.id}}">{{article.title}}</a></td> | ||
<td>{{article.author}}</td> | ||
<td>{{article.created_date}}</td> | ||
<td><a href="/edit/{{article.id}}" class="btn btn-danger">Güncelle</a></td> | ||
<td><a href="/delete/{{article.id}}" class="btn btn-danger">Sil</a></td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% else %} | ||
<div class="alert alert-danger">Henüz makaleniz bulunmuyor...</div> | ||
{% endif %} | ||
|
||
{% endblock body %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{% extends "layout.html" %} | ||
|
||
{% block body %} | ||
|
||
<h3>Makale Güncelle</h3> | ||
<hr> | ||
|
||
{% from "includes/formhelpers.html" import render_field %} | ||
|
||
<form method="post"> | ||
{{ render_field(form.title,class = "form-control") }} | ||
{{ render_field(form.content,class = "form-control") }} | ||
<button type="submit" class="btn btn-danger">Güncelle</button> | ||
</form> | ||
|
||
{% endblock body %} |