diff options
author | Dan McGee <dan@archlinux.org> | 2013-01-19 12:06:47 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2013-01-19 12:08:31 -0600 |
commit | 1a7e5d22f1c4e948c624d26b4d8c1ed30189acfe (patch) | |
tree | feb3473bb7a31868910a45bc481c471f765bf565 /releng/views.py | |
parent | 8cfaa39a0464f7ee35af76473d3e73ae587a6cb8 (diff) |
Add basic release list and details views
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'releng/views.py')
-rw-r--r-- | releng/views.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/releng/views.py b/releng/views.py index 67b3cb4a..6c49275f 100644 --- a/releng/views.py +++ b/releng/views.py @@ -3,10 +3,11 @@ from django.conf import settings from django.db.models import Count, Max from django.http import Http404 from django.shortcuts import get_object_or_404, redirect, render +from django.views.generic import DetailView, ListView from .models import (Architecture, BootType, Bootloader, ClockChoice, Filesystem, HardwareType, InstallType, Iso, IsoType, Module, Source, - Test) + Test, Release) def standard_field(model, empty_label=None, help_text=None, required=True): @@ -213,4 +214,14 @@ def iso_overview(request): } return render(request, 'releng/iso_overview.html', context) + +class ReleaseListView(ListView): + model = Release + + +class ReleaseDetailView(DetailView): + model = Release + slug_field = 'version' + slug_url_kwarg = 'version' + # vim: set ts=4 sw=4 et: |