aboutsummaryrefslogtreecommitdiffstats
path: root/layerindex/views.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-03-31 20:38:30 +0100
committerPaul Eggleton <paul.eggleton@linux.intel.com>2013-03-31 20:38:30 +0100
commitce1775db31d7c9c2c776774f7747c2d53e2f511b (patch)
treefa712dd559a22f0b9234e85d79cf5fa666135868 /layerindex/views.py
parent6ec84fb7f50647b4be72dc5c0b22e07cf4ec8eaf (diff)
downloadopenembedded-core-contrib-ce1775db31d7c9c2c776774f7747c2d53e2f511b.tar.gz
Add basic change history page
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'layerindex/views.py')
-rw-r--r--layerindex/views.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/layerindex/views.py b/layerindex/views.py
index 26cd22fec1..fc46da09f2 100644
--- a/layerindex/views.py
+++ b/layerindex/views.py
@@ -21,6 +21,7 @@ from django.template.loader import get_template
from django.template import Context
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
+from reversion.models import Revision
import simplesearch
import settings
@@ -310,3 +311,10 @@ class PlainTextListView(ListView):
template = get_template(self.template_name)
return HttpResponse(template.render(Context(context)),
content_type='text/plain')
+
+class HistoryListView(ListView):
+ context_object_name = "revisions"
+ paginate_by = 50
+
+ def get_queryset(self):
+ return Revision.objects.all().order_by('-date_created')