blob: 05dcd10e27cb27f2eddc66c5ce386dbb88568372 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# Copyright 1998-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from django.http import HttpResponse
from django.shortcuts import render
from django.conf import settings
from .utils import default_siteinfo
from .models import Posts
def index(request):
menyrequest = 'www'
siteinfo = default_siteinfo(request, menyrequest)
siteinfo['posts'] = Posts.objects.all()[:2]
htmlrequest = menyrequest + '/index.html'
return render(request, htmlrequest, siteinfo)
|