From 089f2ef8f91c894c8b49c8ff11e2c76c7c942eda Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Mon, 10 Aug 2009 23:37:17 +0200 Subject: Added "time added" column to packageproperties --- src/matchbox/db/main/models.py | 1 + web/main/views.py | 2 +- web/templates/view-package-props.html | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/matchbox/db/main/models.py b/src/matchbox/db/main/models.py index 1b9946b..9263470 100644 --- a/src/matchbox/db/main/models.py +++ b/src/matchbox/db/main/models.py @@ -26,6 +26,7 @@ class PackageProperties(models.Model): error_code = models.IntegerField() contents = models.ManyToManyField('File',through='PackageProperties_File') useflags = models.ManyToManyField('Useflag') + timeadded = models.DateTimeField(auto_now_add=True) class Attachment(models.Model): packageproperties = models.ForeignKey('PackageProperties') diff --git a/web/main/views.py b/web/main/views.py index 3e5fe77..174453b 100644 --- a/web/main/views.py +++ b/web/main/views.py @@ -61,7 +61,7 @@ def view(request, category_name, pkg_name, pkg_ver): raise Http404 pv = pv[0] - pprops = pv.packageproperties_set.all() + pprops = pv.packageproperties_set.order_by('-timeadded') cpv = "%s/%s-%s" % (category_name, pkg_name, pkg_ver) return render_to_response('view-package-props.html',{'pprops':pprops,'cpv':cpv}) diff --git a/web/templates/view-package-props.html b/web/templates/view-package-props.html index 16e27ea..b262bea 100644 --- a/web/templates/view-package-props.html +++ b/web/templates/view-package-props.html @@ -10,6 +10,7 @@ Compile information for: {{cpv}} {% for prop in pprops %}
+ Added to db: {{prop.timeadded|date:"r"}}
Portage profile: {{prop.profile.name}}
Error code: {{prop.error_code}}
Tinderbox IP: {{prop.tinderbox.ip}}
-- cgit v1.2.3-65-gdbad