Skip to content
This repository
Browse code

Merge branch 'releases/0.2'

  • Loading branch information...
commit a30fd1e9f6d3d5aee5e6267c9b29ec227c1e638f 2 parents 534f09c + 6ed506e
David Winterbottom authored May 21, 2012
20  README.rst
Source Rendered
... ...
@@ -1,13 +1,22 @@
1  
-============================================
2  
-Django-Oscar - Flexible e-commerce on Django
3  
-============================================
  1
+.. image:: http://img94.imageshack.us/img94/9094/oscarza.jpg
4 2
 
5  
-*django-oscar* is an e-commerce framework for Django designed for building
  3
+===================================
  4
+Domain-driven e-commerce for Django
  5
+===================================
  6
+
  7
+Oscar is an e-commerce framework for Django designed for building
6 8
 domain-driven e-commerce sites.  It is structured such that any part of the
7 9
 core functionality can be customised to suit the needs of your project.  This
8 10
 allows it to handle a wide range of e-commerce requirements, from large-scale B2C
9 11
 sites to complex B2B sites rich in domain-specific business logic.
10 12
 
  13
+Oscar is used in production by:
  14
+
  15
+* Tata - http://www.landmarkonthenet.com
  16
+* Carlsberg's global business platform is powered by Oscar.
  17
+* Dolbeau - http://www.dolbeau.ca/
  18
+* The UK Labour party
  19
+
11 20
 This README is just a stub - see the following links for more details
12 21
 information:
13 22
 
@@ -29,8 +38,9 @@ information:
29 38
 .. _`Twitter account for news and updates`: https://twitter.com/#!/django_oscar
30 39
 .. _`Twitter account of all commits`: https://twitter.com/#!/oscar_django
31 40
 
32  
-Oscar was written by David Winterbottom (`@codeinthehole`_) and is developed
  41
+Oscar was written by `David Winterbottom`_ (`@codeinthehole`_) and is developed
33 42
 and maintained by `Tangent Labs`_, a London-based digital agency.
34 43
 
  44
+.. _`David Winterbottom`: http://codeinthehole.com
35 45
 .. _`@codeinthehole`: https://twitter.com/codeinthehole
36 46
 .. _`Tangent Labs`: http://www.tangentlabs.co.uk
25  oscar/templates/basket/basket.html
... ...
@@ -1,6 +1,6 @@
1 1
 {% extends "layout.html" %}
2 2
 {% load currency_filters %}
3  
-{% load product_tags %}
  3
+{% load thumbnail %}
4 4
 
5 5
 {% block title %}
6 6
 Basket | {{ block.super }}
@@ -50,10 +50,14 @@ <h4 class="span1">Price</h4>
50 50
         <div class="row-fluid">
51 51
     	    <div class="span6">
52 52
     	        {{ form.id }}
53  
-    	        {% product_image form.instance.product as product_image %}
54 53
     		    <div class="image_container">
55  
-    			    <a href="{{ product.get_absolute_url }}"><img class="thumbnail" src="{{ product_image.thumbnail_url }}" alt="{{ product.get_title }}"></a>
  54
+					{% with image=form.instance.product.primary_image %}
  55
+					{% thumbnail image.original "200x200" upscale=False as thumb %}
  56
+					<a href="{{ form.instance.product.get_absolute_url }}"><img class="thumbnail" src="{{ thumb.url }}" alt="{{ product.get_title }}"></a>
  57
+					{% endthumbnail %}
  58
+					{% endwith %}
56 59
     		    </div>
  60
+
57 61
     		    <h4><a href="{{ form.instance.product.get_absolute_url }}">{{ form.instance.description }}</a></h4>
58 62
     		    <p class="app-ico instock avaliability ">{{ form.instance.product.stockrecord.availability }}</p>
59 63
     	    </div>
@@ -180,6 +184,7 @@ <h4 class="span1">Price</h4>
180 184
 
181 185
 {% endif %}
182 186
 
  187
+{% if request.user.is_authenticated %}
183 188
 <div class="well">
184 189
     <div class="sub-header">
185 190
         <h3>To buy later</h3>
@@ -200,12 +205,13 @@ <h4 class="span4">Price</h4>
200 205
         <div class="row-fluid basket-items">
201 206
     	    <div class="span8">
202 207
     			{{ form.id }}
203  
-    			{% product_image form.instance.product as product_image %}
204  
-    			<div class="image_container">
205  
-    				<a href="{{ product.get_absolute_url }}">
206  
-    				    <img class="thumbnail" src="{{ product_image.thumbnail_url }}" alt="{{ product.get_title }}">
207  
-    				</a>
208  
-    			</div>
  208
+    		    <div class="image_container">
  209
+					{% with image=form.instance.product.primary_image %}
  210
+					{% thumbnail image.original "200x200" upscale=False as thumb %}
  211
+					<a href="{{ form.instance.product.get_absolute_url }}"><img class="thumbnail" src="{{ thumb.url }}" alt="{{ product.get_title }}"></a>
  212
+					{% endthumbnail %}
  213
+					{% endwith %}
  214
+    		    </div>
209 215
     			<h4><a href="{{ form.instance.product.get_absolute_url }}">{{ form.instance.description }}</a></h4>
210 216
     			<p class="app-ico instock avaliability ">{{ form.instance.product.stockrecord.availability }}</p>
211 217
     			<a href="#" data-id="{{ forloop.counter0 }}" data-behaviours="remove">Remove</a>
@@ -221,6 +227,7 @@ <h4 class="span4">Price</h4>
221 227
     </form>
222 228
     {% endif %}
223 229
 </div>
  230
+{% endif %}
224 231
 {% endblock content %}
225 232
 
226 233
 {% block onbodyload %}
402  oscar/templates/basket/basket.html.orig
... ...
@@ -1,402 +0,0 @@
1  
-{% extends "layout.html" %}
2  
-{% load currency_filters %}
3  
-{% load product_tags %}
4  
-
5  
-{% block title %}
6  
-Basket | {{ block.super }}
7  
-{% endblock %}
8  
-
9  
-{% block checkout-nav %}
10  
-<<<<<<< HEAD
11  
-<nav class="checkoutNav">
12  
-	<ul class="nav row-fluid">
13  
-		<li class="active span3">
14  
-			<h3>1. Basket</h3>
15  
-		</li>
16  
-		<li class="disabled span2">
17  
-			<h3>2. Shipping Address</h3>
18  
-		</li>
19  
-		<li class="disabled span2">
20  
-			<h3>3. Shipping Options</h3>
21  
-		</li>
22  
-		<li class="disabled span2">
23  
-			<h3>4. Payment</h3>
24  
-		</li>
25  
-		<li class="disabled span2">
26  
-			<h3>5. Place Order</h3>
27  
-		</li>
28  
-	</ul>
29  
-</nav>
30  
-=======
31  
-{% include 'checkout/nav.html' with step=1 %}
32  
->>>>>>> 098e234ffd914d89b8ef0c6df5df2bbecad70b45
33  
-{% endblock %}
34  
-
35  
-{% block header %}
36  
-<div class="page-header">
37  
-    <h1>Basket</h1>
38  
-</div>
39  
-{% endblock header %}
40  
-
41  
-
42  
-{% block content %}
43  
-
44  
-{% if basket_warnings %}
45  
-	<h5>Important messages about items in your basket</h5>
46  
-	{% for warning in basket_warnings %}
47  
-	<div class="alert">{{ warning }}</div>
48  
-	{% endfor %}
49  
-{% endif %}
50  
-
51  
-{% if not basket.is_empty %}
52  
-
53  
-<<<<<<< HEAD
54  
-	<div class="well">
55  
-	    <a href="{% url checkout:index %}" class="pull-right btn btn-primary">Proceed to Checkout</a>
56  
-	</div>
57  
-<form action="." method="post" class="basket_summary">
58  
-    {% csrf_token %}
59  
-    {{ formset.management_form }}
60  
-    <!-- <table class="table table-striped table-bordered">
61  
-        <thead>
62  
-        <tr>
63  
-            <th></th>
64  
-            <th>Product</th>
65  
-            <th>Availability</th>
66  
-            <th>Quantity</th>
67  
-            <th>Unit price</th>
68  
-            <th>Subtotal</th>
69  
-			{% if request.user.is_authenticated %}
70  
-            <th>Save for later&hellip;</th>
71  
-			{% endif %}
72  
-            <th>Remove?</th>
73  
-        </tr>
74  
-        </thead>
75  
-=======
76  
-<form action="." method="post" class="basket_summary" id="basket_formset">
77  
-    {% csrf_token %}
78  
-    {{ formset.management_form }}
79  
-    <table class="table table-striped table-bordered">
80  
->>>>>>> 098e234ffd914d89b8ef0c6df5df2bbecad70b45
81  
-        <tbody>
82  
-        {% for form in formset %}
83  
-        <tr>
84  
-			<td>
85  
-				{{ form.id }}
86  
-				{% product_image form.instance.product as product_image %}
87  
-				<div style="width:100px">
88  
-					<a href="{{ product.get_absolute_url }}"><img class="thumbnail" src="{{ product_image.thumbnail_url }}" alt="{{ product.get_title }}"></a>
89  
-				</div>
90  
-				<a href="{{ form.instance.product.get_absolute_url }}">{{ form.instance.description }}</a><br/>
91  
-				{{ form.instance.product.stockrecord.availability }}
92  
-			</td>
93  
-			<td>
94  
-				{{ form.quantity }} <button class="btn btn-small">Update</button><br/>
95  
-				<a href="#" data-id="{{ forloop.counter0 }}" class="remove">Remove</a>
96  
-				{% if request.user.is_authenticated %}
97  
-					| <a href="#" data-id="{{ forloop.counter0 }}" class="save">Save for later</a>
98  
-				{% endif %}
99  
-				<div style="display:none">
100  
-					{{ form.save_for_later }}
101  
-					{{ form.DELETE }}
102  
-				</div>
103  
-			</td>
104  
-            <td>{{ form.instance.unit_price_incl_tax|currency }}</td>
105  
-            <td>{{ form.instance.line_price_incl_tax|currency }}</td>
106  
-        </tr>
107  
-        {% endfor %}
108  
-        </tbody>
109  
-<<<<<<< HEAD
110  
-    </table> -->
111  
-
112  
-	<form action="." method="post" class="basket_summary">
113  
-	    {% csrf_token %}
114  
-	    {{ formset.management_form }}
115  
-
116  
-	    <!-- <table class="table">
117  
-	                <thead>
118  
-	                <tr>
119  
-	                    <th></th>
120  
-	                    <th>Product</th>
121  
-	                    <th>Availability</th>
122  
-	                    <th>Quantity</th>
123  
-	                    <th>Unit Price Excl. Tax</th>
124  
-	                    <th>Tax</th>
125  
-	                    <th>Line Price Excl. Tax</th>
126  
-	                    <th>Line Price Incl. Tax</th>
127  
-	                    <th>Save for later&hellip;</th>
128  
-	                    <th>Delete?</th>
129  
-	                </tr>
130  
-	                </thead>
131  
-	                <tbody> -->
132  
-	            {% for form in formset %}
133  
-	            <div class="row-fluid basket-products">
134  
-	    			<div class="span2">
135  
-	    				{% product_image form.instance.product as product_image %}
136  
-	    				  <div style="width:100px">
137  
-								<a href="{{ product.get_absolute_url }}"><img class="thumbnail" src="{{ product_image.thumbnail_url }}" alt="{{ product.get_title }}"></a>
138  
-							</div>
139  
-					</div>
140  
-	                <div class="span3">{{ form.id }}
141  
-						<a href="{{ form.instance.product.get_absolute_url }}">{{ form.instance.description }}</a>
142  
-						<label class="checkbox">
143  
-							<p><input id="optionsCheckbox" type="checkbox" value="option1">{{ form.instance.product.stockrecord.availability }}</p>
144  
-						</label>
145  
-					</div>
146  
-					<div class="span2">
147  
-						<form>
148  
-							<div class="checkout-quantity">{{ form.quantity }}</div>
149  
-							<span class="help-inline">Delete? {{ form.DELETE }}</span>
150  
-							<input type="submit" value="Update" class="btn"/>
151  
-					</div>
152  
-					<div class="span3">
153  
-						Item Price: {{ form.instance.line_price_incl_tax|currency }}
154  
-						<p>RRP:</p>
155  
-						<p>You Save</p>
156  
-						<p>RRP:$2.00 (32%)</p>
157  
-					</div>
158  
-					<div class="span2">
159  
-						Save for later? {{ form.save_for_later }}
160  
-					</div>
161  
-				</div>
162  
-                
163  
-	                <!-- <td>{{ form.quantity }}</td>
164  
-	                                <td>{{ form.instance.unit_price_excl_tax|currency }}</td>
165  
-	                                <td>{{ form.instance.unit_tax|currency }}</td>
166  
-	                                <td>{{ form.instance.line_price_excl_tax|currency }}</td>
167  
-	                                <td>{{ form.instance.line_price_incl_tax|currency }}</td>
168  
-	                                <td>{{ form.save_for_later }}</td>
169  
-	                                <td>{{ form.DELETE }}</td>
170  
-	                            </div> -->
171  
-	            {% endfor %}
172  
-	            {% for discount in basket.discounts %}
173  
-	            <!-- <tr>
174  
-	                            <td colspan="7">{{ discount.name }}</td>
175  
-	                            <td colspan="3">-{{ discount.discount|currency }}</td>
176  
-	                        </tr> -->
177  
-	            {% endfor %}
178  
-	            <!-- <tr>
179  
-	                            <td colspan="6">Total</td>
180  
-	                            <td>{{ request.basket.total_excl_tax|currency }}</td>
181  
-	                            <td>{{ basket.total_incl_tax|currency }}</td>
182  
-	                			<td></td>
183  
-	                			<td></td>
184  
-	                        </tr>
185  
-	                        </tbody>
186  
-	                    </table> -->
187  
-
188  
-
189  
-
190  
-	<div class="well">
191  
-		<div class="sub-heading">
192  
-			<h3>Basket Updates</h3>
193  
-		</div>
194  
-	</div>
195  
-	
196  
-	<div class="row-fluid">
197  
-		<div class="span5">	
198  
-			<div class="sub-header">
199  
-				<h2>Voucher/Promo Code</h2>
200  
-			</div>
201  
-			If you have a voucher or promo code, please enter it here.
202  
-			
203  
-			{% if request.basket.pk %}
204  
-
205  
-			<ul>
206  
-			    {% for voucher in basket.vouchers.all %}
207  
-			    <li>
208  
-			        <form action="{% url basket:vouchers-remove voucher.id %}" method="POST">
209  
-			            {% csrf_token %}
210  
-			            {{ voucher.name }} ({{ voucher.code }})
211  
-			            <input type="submit" value="Remove" class="btn"/>
212  
-			        </form>
213  
-			    </li>
214  
-			    {% endfor %}
215  
-			</ul>
216  
-			{% endif %}
217  
-
218  
-			<form action="{% url basket:vouchers-add %}" method="post" class="form-horizontal">
219  
-			    {% csrf_token %}
220  
-			    {% include "partials/form_fields.html" with form=voucher_form %}
221  
-			    <div class="form-actions">
222  
-			        <input type="submit" value="Add voucher" class="btn"/>
223  
-			    </div>
224  
-			</form>
225  
-			
226  
-		</div>
227  
-	    <div class="span7">
228  
-			<div class="sub-header">
229  
-				<h2>Basket Totals</h2>
230  
-			</div>
231  
-	        <table class="table table-striped table-condensed">
232  
-	        	<tbody>
233  
-	        		<tr>
234  
-	        			<th>Basket Subtotal</th>
235  
-	        			<td> {{ basket.total_incl_tax|currency }}</td>
236  
-	        		</tr>
237  
-	        		<tr>
238  
-	       				<th>Delivery From</th>
239  
-	       				<td>{{ shipping_charge_incl_tax|currency }}</td>
240  
-	       			</tr>
241  
-	       			<tr>
242  
-	       				<th>Total</th>
243  
-	       				<td>{{ order_total_incl_tax|currency }}</td>
244  
-	       			</tr>
245  
-	       		</tbody>
246  
-	       	</table>
247  
-			<div class="form-actions">
248  
-		        Made changes? <input type="submit" value="Update basket" class="btn"/>
249  
-		        <a href="{% url checkout:index %}" class="pull-right btn btn-primary">Proceed to Checkout</a>
250  
-		    </div>
251  
-	    </div>
252  
-	</div>
253  
-	</form>
254  
-
255  
-	<div class="row-fluid">
256  
-		<div class="sub-header">
257  
-			<h2>Saved Items</h2>
258  
-		</div>
259  
-		<p>These products are ones you have saved for later</p>
260  
-		<div class="span2"><!-- Product image -->
261  
-		</div>
262  
-	</div>
263  
-=======
264  
-    </table>
265  
-</form>
266  
-
267  
-<p id="voucher_form_link"><a href="#voucher">I have a voucher code...</a></p>
268  
-<div id="voucher_form_container" style="display:none">
269  
-	<h4>Voucher code</h4>
270  
-	<form action="{% url basket:vouchers-add %}" method="post" class="form-horizontal">
271  
-		{% csrf_token %}
272  
-		{% include "partials/form_fields.html" with form=voucher_form %}
273  
-		<div class="form-actions">
274  
-			<button class="btn btn-info">Add voucher</button>
275  
-			or <a href="#" id="voucher_form_cancel">cancel</a>
276  
-		</div>
277  
-	</form>
278  
-</div>
279  
-
280  
-<div id="basket_totals">
281  
-	<table>
282  
-		{% with offer_discounts=basket.offer_discounts voucher_discounts=basket.grouped_voucher_discounts %}
283  
-		{% if offer_discounts or voucher_discounts %}
284  
-			<tr>
285  
-				<th>Basket total (before discounts)</th>
286  
-				<td>{{ basket.total_incl_tax_excl_discounts|currency }}</td>
287  
-			</tr>
288  
-			{% if offer_discounts %}
289  
-				<tr>
290  
-					<th>Site offers</th>
291  
-					<td></td>
292  
-				</tr>
293  
-				{% for discount in offer_discounts %}
294  
-				<tr>
295  
-					<td>{{ discount.name }}</td>
296  
-					<td>-{{ discount.discount|currency }}</td>
297  
-				</tr>
298  
-				{% endfor %}
299  
-			{% endif %}
300  
-			{% if voucher_discounts %}
301  
-				<tr>
302  
-					<th>Vouchers</th>
303  
-					<td></td>
304  
-				</tr>
305  
-				{% for discount in voucher_discounts %}
306  
-				<tr>
307  
-					<td>
308  
-						{{ discount.voucher.name }} ({{ discount.voucher.code }})
309  
-						<form action="{% url basket:vouchers-remove discount.voucher.id %}" method="POST">
310  
-							{% csrf_token %}
311  
-							<input type="submit" value="Remove" class="btn btn-small btn-danger"/>
312  
-						</form>
313  
-					</td>
314  
-					<td>-{{ discount.discount|currency }}</td>
315  
-				</tr>
316  
-				{% endfor %}
317  
-			{% endif %}
318  
-			<tr>
319  
-				<th>Basket total (after discounts)</th>
320  
-				<td>{{ basket.total_incl_tax|currency }}</td>
321  
-			</tr>
322  
-		{% else %}
323  
-			<tr>
324  
-				<th>Basket total</th>
325  
-				<td>{{ basket.total_incl_tax|currency }}</td>
326  
-			</tr>
327  
-		{% endif %}
328  
-		{% endwith %}
329  
-		<tr>
330  
-			<th>Shipping ({{ shipping_method.name }})</th>
331  
-			<td>{{ shipping_charge_incl_tax|currency }}</td>
332  
-		</tr>
333  
-		<tr>
334  
-			<th>Order total</th>
335  
-			<td>{{ order_total_incl_tax|currency }}</td>
336  
-		</tr>
337  
-	</table>
338  
-</div>
339  
-	
340  
-<div class="form-actions">
341  
-	<a href="{% url checkout:index %}" class="pull-right btn btn-large btn-primary">Proceed to checkout</a>
342  
-</div>
343  
->>>>>>> 098e234ffd914d89b8ef0c6df5df2bbecad70b45
344  
-
345  
-	
346  
-{% else %}
347  
-
348  
-	<p>Your basket is empty, you should probably add some items to buy.</p>
349  
-
350  
-{% endif %}
351  
-
352  
-
353  
-<div class="sub-header">
354  
-    <h3>To buy later</h3>
355  
-</div>
356  
-
357  
-{% if not saved_formset %}
358  
-<p>Your saved basket is empty.</p>
359  
-
360  
-{% else %}
361  
-<form action="{% url basket:saved %}" method="post" class="form-stacked later_summary" id="saved_basket_formset">
362  
-    {% csrf_token %}
363  
-
364  
-    {{ saved_formset.management_form }}
365  
-
366  
-    <table class="bordered-table zebra-striped">
367  
-        <tbody>
368  
-        {% for form in saved_formset %}
369  
-        <tr>
370  
-			<td>
371  
-				{{ form.id }}
372  
-				{% product_image form.instance.product as product_image %}
373  
-				<div style="width:100px">
374  
-					<a href="{{ product.get_absolute_url }}"><img class="thumbnail" src="{{ product_image.thumbnail_url }}" alt="{{ product.get_title }}"></a>
375  
-				</div>
376  
-				<a href="{{ form.instance.product.get_absolute_url }}">{{ form.instance.description }}</a><br/>
377  
-				{{ form.instance.product.stockrecord.availability }}
378  
-			</td>
379  
-			<td>
380  
-				<a href="#" data-id="{{ forloop.counter0 }}" class="remove">Remove</a>
381  
-				| <a href="#" data-id="{{ forloop.counter0 }}" class="move">Move to basket</a>
382  
-				<div style="display:none">
383  
-					{{ form.move_to_basket }}
384  
-					{{ form.DELETE }}
385  
-				</div>
386  
-			</td>
387  
-            <td>{{ form.instance.unit_price_incl_tax|currency }}</td>
388  
-            <td>{{ form.instance.line_price_incl_tax|currency }}</td>
389  
-        </tr>
390  
-        {% endfor %}
391  
-        </tbody>
392  
-    </table>
393  
-
394  
-</form>
395  
-{% endif %}
396  
-
397  
-{% endblock content %}
398  
-
399  
-{% block onbodyload %}
400  
-oscar.basket.init();
401  
-{% endblock %}
402  
-
11  oscar/templates/promotions/partials/product_carousel.html
... ...
@@ -1,10 +1,15 @@
9  oscar/templates/promotions/singleproduct.html
... ...
@@ -1,6 +1,6 @@
1 1
 {% load currency_filters %}
2 2
 {% load basket_tags %}
3  
-{% load product_tags %}
  3
+{% load thumbnail %}
4 4
 
5 5
 <article class="well promotion_single">
6 6
     <div class="sub-header">
@@ -8,9 +8,12 @@
8 8
     </div>
9 9
     <div class="row-fluid">
10 10
     	<div class="span3">
11  
-    		{% product_image product as product_image %}
12 11
     		<div class="image_container"> 
13  
-    			<a href="{{ product.get_absolute_url }}"><img class="thumbnail" src="{{ product_image.thumbnail_url }}" alt="{{ product.get_title }}"></a>
  12
+				{% with image=product.primary_image %}
  13
+				{% thumbnail image.original "400x400" upscale=False as thumb %}
  14
+				<a href="{{ product.get_absolute_url }}"><img class="thumbnail" src="{{ thumb.url }}" alt="{{ product.get_title }}"></a>
  15
+				{% endthumbnail %}
  16
+				{% endwith %}
14 17
     		</div>    
15 18
     	</div>
16 19
     	<div class="span9">
37  oscar/templatetags/product_tags.py
... ...
@@ -1,37 +0,0 @@
1  
-from django import template
2  
-from django.db.models import get_model
3  
-from django.conf import settings
4  
-Product = get_model('catalogue', 'product')
5  
-
6  
-register = template.Library()
7  
-
8  
-
9  
-@register.tag(name="product_image")
10  
-def do_basket_form(parse, token):
11  
-    """
12  
-    Template tag for adding the product image data to the context
13  
-    """
14  
-    tokens = token.split_contents()
15  
-    if len(tokens) != 2 and len(tokens) != 4:
16  
-        raise template.TemplateSyntaxError("%r tag uses the following syntax: {%% product_image product_var [as variable_name] %%}" % tokens[0])
17  
-    product_var = tokens[1]
18  
-    context_key = tokens[3] if len(tokens) == 4 else 'image'
19  
-    return ProductImageNode(product_var, context_key)
20  
-
21  
-
22  
-class ProductImageNode(template.Node):
23  
-    def __init__(self, product_var, context_key):
24  
-        self.product_var = template.Variable(product_var)
25  
-        self.context_key = context_key
26  
-
27  
-    def render(self, context):
28  
-        try:
29  
-            product = self.product_var.resolve(context)
30  
-        except template.VariableDoesNotExist:
31  
-            return ''
32  
-        try:
33  
-            image = product.images.all().order_by('display_order')[0]
34  
-        except IndexError:
35  
-            image = {'thumbnail_url': settings.OSCAR_MISSING_IMAGE_URL}
36  
-        context[self.context_key] = image
37  
-        return ''
1  tests/config.py
@@ -25,6 +25,7 @@
25 25
                 'django.contrib.sessions',
26 26
                 'django.contrib.sites',
27 27
                 'django.contrib.flatpages',
  28
+                'sorl.thumbnail',
28 29
                 ] + OSCAR_CORE_APPS,
29 30
             TEMPLATE_CONTEXT_PROCESSORS=(
30 31
                 "django.contrib.auth.context_processors.auth",

0 notes on commit a30fd1e

Please sign in to comment.
Something went wrong with that request. Please try again.