[buildinfo.debian.net] 24/35: select_related these

Chris Lamb chris at chris-lamb.co.uk
Thu Nov 3 19:02:26 UTC 2016


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository buildinfo.debian.net.

commit bdb4af33f91747999db5a3cee8462167103974f4
Author: Chris Lamb <lamby at debian.org>
Date:   Mon Oct 24 09:48:53 2016 +0200

    select_related these
---
 bidb/buildinfo/views.py       | 5 +++++
 templates/buildinfo/view.html | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/bidb/buildinfo/views.py b/bidb/buildinfo/views.py
index a399e61..05f115c 100644
--- a/bidb/buildinfo/views.py
+++ b/bidb/buildinfo/views.py
@@ -10,8 +10,13 @@ def view(request, sha1, filename=None):
     if filename != buildinfo.get_filename():
         return redirect(buildinfo)
 
+    installed_build_depends = buildinfo.installed_build_depends.select_related(
+        'binary',
+    )
+
     return render(request, 'buildinfo/view.html', {
         'buildinfo': buildinfo,
+        'installed_build_depends': installed_build_depends,
     })
 
 def raw_text(request, sha1, filename=None):
diff --git a/templates/buildinfo/view.html b/templates/buildinfo/view.html
index 0938875..cda56d8 100644
--- a/templates/buildinfo/view.html
+++ b/templates/buildinfo/view.html
@@ -137,7 +137,7 @@
 <h3>Installed build-depends</h3>
 
 <ul class="list-unstyled">
-  {% for x in buildinfo.installed_build_depends.all %}
+  {% for x in installed_build_depends %}
   <li>
     <a href="{{ x.binary.get_absolute_url }}">
       <span class="label label-default">{{ x.binary.name }}</span>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/buildinfo.debian.net.git



More information about the Reproducible-commits mailing list