From: "Slava Bacherikov" <slava@bacherikov.org.ua>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoo-packages:master commit in: gpackages/apps/packages/
Date: Fri, 29 Jun 2012 17:29:11 +0000 (UTC) [thread overview]
Message-ID: <1340929708.1534ff4c1ae792366ecdf5a426c55e32130a7722.bacher09@gentoo> (raw)
commit: 1534ff4c1ae792366ecdf5a426c55e32130a7722
Author: Slava Bacherikov <slava <AT> bacher09 <DOT> org>
AuthorDate: Fri Jun 29 00:28:28 2012 +0000
Commit: Slava Bacherikov <slava <AT> bacherikov <DOT> org <DOT> ua>
CommitDate: Fri Jun 29 00:28:28 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-packages.git;a=commit;h=1534ff4c
Litle optimize queries
---
gpackages/apps/packages/views.py | 22 ++++------------------
1 files changed, 4 insertions(+), 18 deletions(-)
diff --git a/gpackages/apps/packages/views.py b/gpackages/apps/packages/views.py
index 98672d4..3b4cd23 100644
--- a/gpackages/apps/packages/views.py
+++ b/gpackages/apps/packages/views.py
@@ -56,15 +56,8 @@ class PackagesListsView(ContextListView):
context_object_name = 'packages'
queryset = PackageModel.objects.all(). \
select_related('virtual_package',
- 'virtual_package__category',
- 'repository'). \
- defer('repository__description',
- 'repository__owner_name',
- 'repository__owner_email',
- 'repository__homepage',
- 'repository__official',
- 'repository__quality',
- 'changelog'). \
+ 'virtual_package__category'). \
+ prefetch_related('repository'). \
prefetch_keywords(arches)
class PackageDetailView(ContextView, DetailView):
@@ -74,15 +67,8 @@ class PackageDetailView(ContextView, DetailView):
context_object_name = 'package'
queryset = PackageModel.objects.all(). \
select_related('virtual_package',
- 'virtual_package__category',
- 'repository'). \
- defer('repository__description',
- 'repository__owner_name',
- 'repository__owner_email',
- 'repository__homepage',
- 'repository__official',
- 'repository__quality',
- 'changelog'). \
+ 'virtual_package__category'). \
+ prefetch_related('repository'). \
prefetch_keywords(arches)
def get_object(self, queryset = None):
next reply other threads:[~2012-06-29 17:29 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-29 17:29 Slava Bacherikov [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-09-23 19:35 [gentoo-commits] proj/gentoo-packages:master commit in: gpackages/apps/packages/ Slava Bacherikov
2012-09-13 22:17 Slava Bacherikov
2012-08-26 23:00 Slava Bacherikov
2012-08-20 13:03 Slava Bacherikov
2012-08-20 13:03 Slava Bacherikov
2012-08-11 22:30 Slava Bacherikov
2012-08-11 22:30 Slava Bacherikov
2012-08-07 0:10 Slava Bacherikov
2012-07-31 23:20 Slava Bacherikov
2012-07-30 23:30 Slava Bacherikov
2012-07-30 12:59 Slava Bacherikov
2012-07-25 22:47 Slava Bacherikov
2012-07-25 22:47 Slava Bacherikov
2012-07-22 23:46 Slava Bacherikov
2012-07-19 23:50 Slava Bacherikov
2012-07-19 23:50 Slava Bacherikov
2012-07-18 23:20 Slava Bacherikov
2012-07-18 23:20 Slava Bacherikov
2012-07-15 23:08 Slava Bacherikov
2012-07-15 23:08 Slava Bacherikov
2012-07-12 22:16 Slava Bacherikov
2012-07-08 19:54 Slava Bacherikov
2012-07-05 23:27 Slava Bacherikov
2012-07-04 22:13 Slava Bacherikov
2012-07-03 21:08 Slava Bacherikov
2012-07-02 22:25 Slava Bacherikov
2012-06-29 17:29 Slava Bacherikov
2012-06-28 23:59 Slava Bacherikov
2012-06-28 23:59 Slava Bacherikov
2012-06-27 22:52 Slava Bacherikov
2012-06-25 22:23 Slava Bacherikov
2012-06-24 23:21 Slava Bacherikov
2012-06-20 23:23 Slava Bacherikov
2012-06-20 23:23 Slava Bacherikov
2012-06-20 23:23 Slava Bacherikov
2012-06-13 22:15 Slava Bacherikov
2012-06-12 18:34 Slava Bacherikov
2012-06-10 22:56 Slava Bacherikov
2012-06-10 17:51 Slava Bacherikov
2012-06-09 18:19 Slava Bacherikov
2012-06-09 18:19 Slava Bacherikov
2012-06-07 22:48 Slava Bacherikov
2012-06-07 18:37 Slava Bacherikov
2012-06-07 18:37 Slava Bacherikov
2012-06-07 18:37 Slava Bacherikov
2012-06-07 18:37 Slava Bacherikov
2012-06-07 11:27 Slava Bacherikov
2012-06-06 22:48 Slava Bacherikov
2012-06-05 20:48 Slava Bacherikov
2012-06-05 20:48 Slava Bacherikov
2012-06-05 20:48 Slava Bacherikov
2012-06-05 15:49 Slava Bacherikov
2012-06-05 15:49 Slava Bacherikov
2012-06-03 16:19 Slava Bacherikov
2012-06-03 13:19 Slava Bacherikov
2012-05-31 13:34 Slava Bacherikov
2012-05-29 21:34 Slava Bacherikov
2012-05-29 13:38 Slava Bacherikov
2012-05-29 12:24 Slava Bacherikov
2012-05-29 12:24 Slava Bacherikov
2012-05-29 12:24 Slava Bacherikov
2012-05-28 20:32 Slava Bacherikov
2012-05-28 17:00 Slava Bacherikov
2012-05-28 17:00 Slava Bacherikov
2012-05-28 17:00 Slava Bacherikov
2012-05-28 10:39 Slava Bacherikov
2012-05-28 10:39 Slava Bacherikov
2012-05-27 22:48 Slava Bacherikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1340929708.1534ff4c1ae792366ecdf5a426c55e32130a7722.bacher09@gentoo \
--to=slava@bacherikov.org.ua \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox