summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-04-07 22:13:37 +0200
committerDan McGee <dan@archlinux.org>2011-04-08 00:01:44 +0200
commitecfcdfda941ef0c991300c6eb25fe336c3fd9cbe (patch)
treeefb2eec3a77a624e1f7ddad2ec3da616497d06b9 /packages
parent0d3e1eb796d673607bb8beb91c61114209fd9155 (diff)
downloadarchweb-ecfcdfda941ef0c991300c6eb25fe336c3fd9cbe.tar.gz
archweb-ecfcdfda941ef0c991300c6eb25fe336c3fd9cbe.tar.xz
Select related needed objects when pulling package details
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages')
-rw-r--r--packages/views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/views.py b/packages/views.py
index 263165f..2f614e3 100644
--- a/packages/views.py
+++ b/packages/views.py
@@ -84,7 +84,8 @@ def update(request):
def details(request, name='', repo='', arch=''):
if all([name, repo, arch]):
try:
- pkg = Package.objects.get(pkgname=name,
+ pkg = Package.objects.select_related(
+ 'arch', 'repo', 'packager').get(pkgname=name,
repo__name__iexact=repo, arch__name=arch)
return direct_to_template(request, 'packages/details.html',
{'pkg': pkg, })