diff options
author | Dan McGee <dan@archlinux.org> | 2011-04-07 22:13:37 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-04-08 00:01:44 +0200 |
commit | ecfcdfda941ef0c991300c6eb25fe336c3fd9cbe (patch) | |
tree | efb2eec3a77a624e1f7ddad2ec3da616497d06b9 /packages | |
parent | 0d3e1eb796d673607bb8beb91c61114209fd9155 (diff) | |
download | archweb-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.py | 3 |
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, }) |