summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorIsmael Carnales <icarnales@gmail.com>2009-10-30 21:32:25 +0100
committerIsmael Carnales <icarnales@gmail.com>2009-11-10 01:24:41 +0100
commitb4999b495e828ff68a5c93f65a39efad5b37dcea (patch)
tree8b9455454362b8d66e11f7983b2b9d8b4318f411 /public
parent7cd5c1f5a6dacd1aeab1a9a30e9af79e7e294482 (diff)
downloadarchweb-b4999b495e828ff68a5c93f65a39efad5b37dcea.tar.gz
archweb-b4999b495e828ff68a5c93f65a39efad5b37dcea.tar.xz
changed landing view
- moved devel.views.siteindex to public.views.index - using template from public view with added devel menu - added extra styles and images
Diffstat (limited to 'public')
-rw-r--r--public/views.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/public/views.py b/public/views.py
index 1f8e688..4a4e01e 100644
--- a/public/views.py
+++ b/public/views.py
@@ -3,17 +3,19 @@ from archweb.main.models import AltForum, Arch, Donor, MirrorUrl, News
from archweb.main.models import Package, Repo, ExternalProject
from django.db.models import Q
from django.shortcuts import render_to_response
+from django.template import RequestContext
from django.views.generic import list_detail
+
def index(request):
- # get the most recent 10 news items
- news = News.objects.order_by('-postdate', '-id')[:10]
- pkgs = Package.objects.order_by('-last_update')[:15]
- repos = Repo.objects.order_by('name')
- arches = Arch.objects.exclude(name__iexact='any').order_by('name')
- return render_to_response('public/index.html',
- {'news_updates':news,'pkg_updates':pkgs,
- 'repos':repos, 'arches': arches, 'path':request.path})
+ context = {
+ 'news': News.objects.order_by('-postdate', '-id')[:10],
+ 'pkgs': Package.objects.exclude(repo__name__iexact='testing').order_by(
+ '-last_update')[:15],
+ 'repos': Repo.objects.all()
+ }
+ return render_to_response('public/index.html', RequestContext(request,
+ context))
def about(request):
return render_to_response('public/about.html')