Skip to content

Commit 7537937

Browse files
committed
İskelet yapı düzene sokuldu.
1 parent f1e33e5 commit 7537937

14 files changed

Lines changed: 34 additions & 36 deletions

‎Blog/views.py‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,17 @@ def category_page(request, category_names,id):
157157
def human(request):
158158
""" humans.txt"""
159159

160-
return render(request, 'humans.html')
160+
return render(request, 'blog_templates/humans.html')
161161

162162

163163
def robots(request):
164164
"""robots.txt"""
165165

166-
return render(request, 'robots.html')
166+
return render(request, 'blog_templates/robots.html')
167+
168+
def last_content(request):
169+
""" Alt taraf son yazılar """
170+
last_db = post.objects.order_by()[:3]
171+
return render(request,'blog_templates/last_content.html',{
172+
'last_db':last_db
173+
})

‎templates/about.html‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% extends 'base.html' %}
1+
{% extends 'blog_templates/base.html' %}
22
{% load static %}
33

44
<!-- SEO -->
@@ -151,7 +151,5 @@ <h4>Yeteneklerim</h4>
151151
{% endblock %}
152152

153153
{% block last_content %}
154-
{% for i in last_db %}
155-
<a href="/{{ i.seo_url }}"><i class="fa fa-share" aria-hidden="true"></i> {{ i.title }}</a><br/>
156-
{% endfor %}
154+
{% include 'blog_templates/last_content.html' %}
157155
{% endblock %}

‎templates/blog.html‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% extends 'base.html' %}
1+
{% extends 'blog_templates/base.html' %}
22
{% load static %}
33

44
<!-- SEO -->
@@ -89,8 +89,7 @@ <h3 class="title"><a href="/{{ i.seo_url }}">{{ i.title }}</a></h3>
8989
</div>
9090

9191
{% endblock %}
92+
9293
{% block last_content %}
93-
{% for i in last_db %}
94-
<a href="/{{ i.seo_url }}"><i class="fa fa-share" aria-hidden="true"></i> {{ i.title }}</a><br/>
95-
{% endfor %}
94+
{% include 'blog_templates/last_content.html' %}
9695
{% endblock %}

‎templates/blog_details.html‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% extends 'base.html' %}
1+
{% extends 'blog_templates/base.html' %}
22
{% load static %}
33

44
{% block title %}{{ title }}{% endblock %}
@@ -43,8 +43,7 @@ <h3>{{ i.title }}</h3>
4343
</div><!-- /container -->
4444
{% endfor %}
4545
{% endblock %}
46+
4647
{% block last_content %}
47-
{% for i in last_db %}
48-
<a href="/{{ i.seo_url }}"><i class="fa fa-share" aria-hidden="true"></i> {{ i.title }}</a><br/>
49-
{% endfor %}
48+
{% include 'blog_templates/last_content.html' %}
5049
{% endblock %}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{% for i in last_db %}
2+
<a href="/{{ i.seo_url }}"><i class="fa fa-share" aria-hidden="true"></i> {{ i.title }}</a><br/>
3+
{% endfor %}

‎templates/category.html‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% extends 'base.html' %}
1+
{% extends 'blog_templates/base.html' %}
22
{% load static %}
33

44
{% block title %}{{ title }}{% endblock %}
@@ -58,8 +58,7 @@ <h3><i class="{{ i.category_icon }}" aria-hidden="true"> {{ i.category_name }}</
5858
</div><!-- /container -->
5959

6060
{% endblock %}
61+
6162
{% block last_content %}
62-
{% for i in last_db %}
63-
<a href="/{{ i.seo_url }}"><i class="fa fa-share" aria-hidden="true"></i> {{ i.title }}</a><br/>
64-
{% endfor %}
63+
{% include 'blog_templates/last_content.html' %}
6564
{% endblock %}

‎templates/category_page.html‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% extends 'base.html' %}
1+
{% extends 'blog_templates/base.html' %}
22
{% load static %}
33

44
{% block title %}{{ title }}{% endblock %}
@@ -59,8 +59,7 @@ <h3><i class="{{ i.category_icon }}" aria-hidden="true"> {{ i.category_name }}</
5959
</div><!-- /container -->
6060

6161
{% endblock %}
62+
6263
{% block last_content %}
63-
{% for i in last_db %}
64-
<a href="/{{ i.seo_url }}"><i class="fa fa-share" aria-hidden="true"></i> {{ i.title }}</a><br/>
65-
{% endfor %}
64+
{% include 'blog_templates/last_content.html' %}
6665
{% endblock %}

0 commit comments

Comments
 (0)