Skip to content

Commit c77dfb8

Browse files
committed
Anasayfa kontrol edildi ve yazım hatası bulunamadı.
Facebook ve sitemap.xml logo linlkleri eklendi.
1 parent 1ea73c3 commit c77dfb8

File tree

2 files changed

+38
-12
lines changed

2 files changed

+38
-12
lines changed

Blog/views.py

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,63 @@
22
from Blog.models import post,category
33
# Create your views here.
44
def home(request):
5+
"""Ana Sayfa"""
56
db = post.objects.order_by('?')[:6]
6-
return render(request,'profil.html',locals())
7+
return render(request,'profil.html',{
8+
'db':db
9+
})
710

811
def about(request):
12+
""" Hakkımda Sayfası """
913
last_db = post.objects.order_by('?')[:3]
10-
return render(request,'about.html',locals())
14+
return render(request,'about.html',{
15+
'last_db':last_db
16+
})
1117

1218
def contact(request):
19+
""" İletişim Sayfası """
1320
last_db = post.objects.order_by('?')[:3]
14-
return render(request,'contact.html',locals())
21+
return render(request,'contact.html',{
22+
'last_db': last_db
23+
})
1524

1625
def blog(request):
26+
""" Blog yazıların listelendiği sayfa"""
1727
last_db = post.objects.order_by('?')[:3]
1828
db = post.objects.all()
1929
category_db = category.objects.all()
20-
return render(request,'blog.html',locals())
30+
return render(request,'blog.html',{
31+
'last_db': last_db,
32+
'db':db,
33+
'category_db':category_db
34+
})
2135

2236
def makale(request,slug):
37+
""" makale_details sayfası """
2338
last_db = post.objects.order_by('?')[:3]
2439
category_db = category.objects.all()
2540
db = post.objects.filter(seo_url=slug)
26-
return render(request,'blog_details.html',locals())
27-
41+
return render(request,'blog_details.html',{
42+
'last_db': last_db,
43+
'db':db,
44+
'category_db':category_db
45+
})
2846
def category_view(request,category_names):
47+
""" category details sayfası """
2948
last_db = post.objects.order_by('?')[:3]
3049
category_db_list = category.objects.all()
3150
category_db = category.objects.filter(category_name=str(category_names))
3251
post_db = post.objects.filter(category_list__category_name=category_names)
33-
return render(request,'category.html',locals())
52+
return render(request,'category.html',{
53+
'last_db': last_db,
54+
'category_db_list':category_db_list,
55+
'category_db':category_db,
56+
'post_db':post_db
57+
})
3458

3559
def human(request):
60+
""" humans.txt"""
3661
return render(request,'humans.html')
3762
def robots(request):
63+
"""robots.txt"""
3864
return render(request,'robots.html')

templates/base.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ <h4>Son Yazılarım</h4>
8383
<h4>Sosyal Medya Hesaplarım</h4>
8484
<div class="col-md-12">
8585
<ul class="social-network social-circle">
86-
<li><a href="#" class="icoRss" title="Rss"><i class="fa fa-rss"></i></a></li>
87-
<li><a href="#" class="icoFacebook" title="Facebook"><i class="fa fa-facebook"></i></a></li>
88-
<li><a href="#" class="icoTwitter" title="Twitter"><i class="fa fa-twitter"></i></a></li>
89-
<li><a href="#" class="icoGoogle" title="Google +"><i class="fa fa-google-plus"></i></a></li>
90-
<li><a href="#" class="icoLinkedin" title="Linkedin"><i class="fa fa-linkedin"></i></a></li>
86+
<li><a href="/sitemap.xml" class="icoRss" title="Rss"><i class="fa fa-sitemap"></i></a></li>
87+
<li><a href="https://www.facebook.com/aliymn44" class="icoFacebook" title="Facebook"><i class="fa fa-facebook"></i></a></li>
88+
<li><a href="https://www.facebook.com/aliymn44" class="icoTwitter" title="Twitter"><i class="fa fa-twitter"></i></a></li>
89+
<li><a href="https://www.facebook.com/aliymn44" class="icoGoogle" title="Google +"><i class="fa fa-google-plus"></i></a></li>
90+
<li><a href="https://www.facebook.com/aliymn44" class="icoLinkedin" title="Linkedin"><i class="fa fa-linkedin"></i></a></li>
9191
</ul>
9292
</div>
9393
</div><!-- /col-lg-4 -->

0 commit comments

Comments
 (0)