diff options
author | Stanislav Ochotnicky <sochotnicky@gmail.com> | 2009-08-10 23:37:17 +0200 |
---|---|---|
committer | Stanislav Ochotnicky <sochotnicky@gmail.com> | 2009-08-10 23:37:17 +0200 |
commit | 089f2ef8f91c894c8b49c8ff11e2c76c7c942eda (patch) | |
tree | f2336703afb5c0a9eb57fce7576fb7a40901d84e | |
parent | Made categories/packages sorted when browsing (diff) | |
download | collagen-089f2ef8f91c894c8b49c8ff11e2c76c7c942eda.tar.gz collagen-089f2ef8f91c894c8b49c8ff11e2c76c7c942eda.tar.bz2 collagen-089f2ef8f91c894c8b49c8ff11e2c76c7c942eda.zip |
Added "time added" column to packageproperties
-rw-r--r-- | src/matchbox/db/main/models.py | 1 | ||||
-rw-r--r-- | web/main/views.py | 2 | ||||
-rw-r--r-- | web/templates/view-package-props.html | 1 |
3 files changed, 3 insertions, 1 deletions
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 %} <div class="compileinfo-{% cycle odd,even %}"> + Added to db: {{prop.timeadded|date:"r"}}<br /> Portage profile: {{prop.profile.name}}<br /> Error code: {{prop.error_code}} <br /> Tinderbox IP: {{prop.tinderbox.ip}} <br /> |