diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-04-13 21:00:49 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-04-13 21:00:49 -0400 |
commit | 7aab774ad05b81eb204774bf17cc613401310f7b (patch) | |
tree | 812929abb2ae6fae90e6a56d4237738d7ca62a8f /packages/models.py | |
parent | 355087ebe2e3fbd5f860e4655888a89d9df52e34 (diff) | |
parent | c266efc7fc73f94995bffcdf8e0ef7a4aeb563c3 (diff) |
Merge tag 'release_2014-10-19' into archweb-generic
Jinja2 switch for some templates, exact matches in package search
# Conflicts:
# templates/packages/search.html
Diffstat (limited to 'packages/models.py')
-rw-r--r-- | packages/models.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/models.py b/packages/models.py index dd69e7d3..03f03422 100644 --- a/packages/models.py +++ b/packages/models.py @@ -379,6 +379,13 @@ class RelatedToBase(models.Model): given criteria. It will not search provisions, but will find packages named and matching repo characteristics if possible.''' pkgs = Package.objects.normal().filter(pkgname=self.name) + # TODO: this may in fact be faster- select only the fields we know will + # actually get used, saving us some bandwidth and hopefully query + # construction time. However, reality hasn't quite proved it out yet. + #pkgs = Package.objects.select_related('repo', 'arch').only( + # 'id', 'pkgname', 'epoch', 'pkgver', 'pkgrel', + # 'repo__id', 'repo__name', 'repo__testing', 'repo__staging', + # 'arch__id', 'arch__name').filter(pkgname=self.name) if not self.pkg.arch.agnostic: # make sure we match architectures if possible arches = self.pkg.applicable_arches() |