Browse Source

Prefetch generic content objects for promotions

master
Asia Biega 13 years ago
parent
commit
fe8b533f3e
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      oscar/apps/promotions/context_processors.py

+ 1
- 0
oscar/apps/promotions/context_processors.py View File

@@ -25,6 +25,7 @@ def get_request_promotions(request):
25 25
     Return promotions relevant to this request
26 26
     """
27 27
     promotions = PagePromotion._default_manager.select_related() \
28
+                                               .prefetch_related('content_object') \
28 29
                                                .filter(page_url=request.path) \
29 30
                                                .order_by('display_order')
30 31
 

Loading…
Cancel
Save