Sfoglia il codice sorgente

Adjust dashboard templates (following pull request #326)

* Add missing i18n tags
* Tidy pagination
* Minify CSS
* Remove dead HTMl
* Remove simple settings file

Closes #326
master
David Winterbottom 13 anni fa
parent
commit
593aaef885

+ 141
- 882
oscar/static/oscar/css/dashboard.css
File diff soppresso perché troppo grande
Vedi File


+ 2
- 874
oscar/static/oscar/css/responsive.css
File diff soppresso perché troppo grande
Vedi File


+ 680
- 4476
oscar/static/oscar/css/styles.css
File diff soppresso perché troppo grande
Vedi File


+ 1
- 5
oscar/templates/oscar/dashboard/catalogue/category_list.html Vedi File

@@ -14,11 +14,7 @@
14 14
 		<a href="{% url dashboard:index %}">{% trans "Dashboard" %}</a>
15 15
         <span class="divider">/</span>
16 16
     </li>
17
-    <li>
18
-		<a href="{% url dashboard:catalogue-category-list %}">{% trans "Category management" %}</a>
19
-        <span class="divider">/</span>
20
-    </li>
21
-	<li class="active"><a href=".">{{ category.name }}</a></li>
17
+    <li class="active"><a href=".">{% trans "Categories" %}</a></li>
22 18
 </ul>
23 19
 {% endblock %}
24 20
 

+ 37
- 41
oscar/templates/oscar/dashboard/catalogue/product_list.html Vedi File

@@ -35,7 +35,7 @@
35 35
         <span class="control-group">
36 36
             <label for="id_promotion_type">{% trans "Create a new product of type" %}</label>
37 37
             <select id="id_promotion_type" name="product_class">
38
-                <option> -- choose type --</option>
38
+                <option> -- {% trans "Choose type" %} --</option>
39 39
                 {% for product_class in product_classes %}
40 40
                 <option value="{{ product_class.id }}">{{ product_class.name }}</option>
41 41
                 {% endfor %}
@@ -51,46 +51,42 @@
51 51
 {% if products %}
52 52
 <form action="." method="post">
53 53
     {% csrf_token %}
54
-<table class="table table-striped table-bordered">
55
-    <tr>
56
-		<th>{% trans "UPC" %}</th>
57
-		<th>{% trans "Title" %}</th>
58
-		<th>{% trans "Product class" %}</th>
59
-		<th>{% trans "Status" %}</th>
60
-		<th>{% trans "Partner" %}</th>
61
-		<th>{% trans "Partner SKU" %}</th>
62
-		<th>{% trans "Price excl. tax" %}</th>
63
-		<th>{% trans "Price incl. tax" %}</th>
64
-		<th>{% trans "Number in stock" %}</th>
65
-		<th>{% trans "Number allocated" %}</th>
66
-        <th></th>
67
-    </tr>
68
-    {% for product in products %}
69
-    <tr>
70
-		<td>{{ product.upc|default:"-" }}</td>
71
-        <td>{{ product.get_title }}</td>
72
-		<td>{{ product.product_class.name }}</td>
73
-		<td>{{ product.status|default:"-" }}</td>
74
-		{% with stockrecord=product.stockrecord %}
75
-			<td>{{ stockrecord.partner.name }}</td>
76
-			<td>{{ stockrecord.partner_sku }}</td>
77
-			<td>{{ stockrecord.price_excl_tax|currency }}</td>
78
-			<td>{{ stockrecord.price_incl_tax|currency }}</td>
79
-			<td>{{ stockrecord.num_in_stock }}</td>
80
-			<td>{{ stockrecord.num_allocated }}</td>
81
-		{% endwith %}
82
-		<td>
83
-			<a class="btn btn-info" href="{% url dashboard:catalogue-product product.id %}">{% trans "Edit" %}</a>
84
-			<a class="btn btn-success" href="{{ product.get_absolute_url }}">{% trans "View on site" %}</a>
85
-		</td>
86
-    </tr>
87
-    {% endfor %}
88
-</table>
89
-
90
-{% if page_obj %}
91
-    {% include "partials/pagination.html" %}
92
-{% endif %}
93
-
54
+	<table class="table table-striped table-bordered">
55
+	    <tr>
56
+			<th>{% trans "UPC" %}</th>
57
+			<th>{% trans "Title" %}</th>
58
+			<th>{% trans "Product class" %}</th>
59
+			<th>{% trans "Status" %}</th>
60
+			<th>{% trans "Partner" %}</th>
61
+			<th>{% trans "Partner SKU" %}</th>
62
+			<th>{% trans "Price excl. tax" %}</th>
63
+			<th>{% trans "Price incl. tax" %}</th>
64
+			<th>{% trans "Number in stock" %}</th>
65
+			<th>{% trans "Number allocated" %}</th>
66
+	        <th></th>
67
+	    </tr>
68
+	    {% for product in products %}
69
+	    <tr>
70
+			<td>{{ product.upc|default:"-" }}</td>
71
+	        <td>{{ product.get_title }}</td>
72
+			<td>{{ product.product_class.name }}</td>
73
+			<td>{{ product.status|default:"-" }}</td>
74
+			{% with stockrecord=product.stockrecord %}
75
+				<td>{{ stockrecord.partner.name }}</td>
76
+				<td>{{ stockrecord.partner_sku }}</td>
77
+				<td>{{ stockrecord.price_excl_tax|currency }}</td>
78
+				<td>{{ stockrecord.price_incl_tax|currency }}</td>
79
+				<td>{{ stockrecord.num_in_stock }}</td>
80
+				<td>{{ stockrecord.num_allocated }}</td>
81
+			{% endwith %}
82
+			<td>
83
+				<a class="btn btn-info" href="{% url dashboard:catalogue-product product.id %}">{% trans "Edit" %}</a>
84
+				<a class="btn btn-success" href="{{ product.get_absolute_url }}">{% trans "View on site" %}</a>
85
+			</td>
86
+	    </tr>
87
+	    {% endfor %}
88
+	</table>
89
+	{% include "partials/pagination.html" %}
94 90
 </form>
95 91
 
96 92
 {% else %}

+ 82
- 82
oscar/templates/oscar/dashboard/catalogue/product_update.html Vedi File

@@ -5,17 +5,17 @@
5 5
 {% block body_class %}catalogue{% endblock %}
6 6
 
7 7
 {% block title %}
8
-Update product | {{ block.super }}
8
+{% trans "Update product" %} | {{ block.super }}
9 9
 {% endblock %}
10 10
 
11 11
 {% block breadcrumbs %}
12 12
 <ul class="breadcrumb">
13 13
     <li>
14
-        <a href="{% url dashboard:index %}">Dashboard</a>
14
+        <a href="{% url dashboard:index %}">{% trans "Dashboard" %}</a>
15 15
         <span class="divider">/</span>
16 16
     </li>
17 17
     <li>
18
-        <a href="{% url dashboard:catalogue-product-list %}">Catalogue</a>
18
+        <a href="{% url dashboard:catalogue-product-list %}">{% trans "Catalogue" %}</a>
19 19
         <span class="divider">/</span>
20 20
     </li>
21 21
     <li class="active"><a href=".">{{ title }}</a></li>
@@ -40,31 +40,31 @@ Update product | {{ block.super }}
40 40
             {% if field.is_hidden %}
41 41
                 {{ field }}
42 42
             {% endif %}
43
-            {% if 'attr' not in field.id_for_label %}
44
-<div class="control-group {% for error in field.errors %}error{% endfor %}">
45
-                    {% if field.is_hidden %}
46
-                        {{ field }}
47
-                    {% else %}
48
-                        <label for="{{ field.auto_id }}" class="control-label {% if field.field.required %}required{% endif %}">{{ field.label }}{% if field.field.required %} <span>*</span>{% endif %}</label>
49
-                        <div class="controls">
50
-                            {{ field }}
51
-                            {% for error in field.errors %}
43
+        {% if 'attr' not in field.id_for_label %}
44
+        <div class="control-group {% for error in field.errors %}error{% endfor %}">
45
+            {% if field.is_hidden %}
46
+                {{ field }}
47
+            {% else %}
48
+            <label for="{{ field.auto_id }}" class="control-label {% if field.field.required %}required{% endif %}">{{ field.label }}{% if field.field.required %} <span>*</span>{% endif %}</label>
49
+            <div class="controls">
50
+                {{ field }}
51
+                {% for error in field.errors %}
52 52
                 <span class="help-block">
53
-                {{ error|escape }}
53
+                    {{ error }}
54 54
                 </span>
55
-                            {% endfor %}
56
-                            {% if field.help_text %}
57
-                                <span class='help-block'>
58
-                                    {{ field.help_text }}
59
-                                </span>
60
-                            {% endif %}
61
-                        </div>
62
-                    {% endif %}
63
-                </div>
64
-{% endif %}
55
+                {% endfor %}
56
+                {% if field.help_text %}
57
+                <span class='help-block'>
58
+                    {{ field.help_text }}
59
+                </span>
60
+                {% endif %}
61
+            </div>
62
+            {% endif %}
63
+        </div>
64
+        {% endif %}
65 65
         {% endfor %}
66 66
     </div>
67
-	<div class="well well-blank">
67
+    <div class="well well-blank">
68 68
         <div class="sub-header">
69 69
             <h3>{% trans "Product Attributes" %}</h3>
70 70
         </div>
@@ -87,7 +87,7 @@ Update product | {{ block.super }}
87 87
                     {{ field }}
88 88
                     {% for error in field.errors %}
89 89
                     <span class="help-block">
90
-                        {{ error|escape }}
90
+                        {{ error }}
91 91
                     </span>
92 92
                     {% endfor %}
93 93
                     {% if field.help_text %}
@@ -100,71 +100,71 @@ Update product | {{ block.super }}
100 100
             </div>
101 101
             {% endif %}
102 102
         {% endfor %}
103
-	</div>
103
+    </div>
104 104
 
105
-	<div class="well well-blank form-inline">
106
-		<div class="sub-header">
107
-			<h3>{% trans "Category" %}</h3>
108
-		</div>
109
-		{{ category_formset.management_form }}
110
-		{% for category_form in category_formset %}
111
-		{% include "partials/form_fields_inline.html" with form=category_form %}
112
-		{% endfor %}
113
-	</div>
105
+    <div class="well well-blank form-inline">
106
+        <div class="sub-header">
107
+            <h3>{% trans "Category" %}</h3>
108
+        </div>
109
+        {{ category_formset.management_form }}
110
+        {% for category_form in category_formset %}
111
+            {% include "partials/form_fields_inline.html" with form=category_form %}
112
+        {% endfor %}
113
+    </div>
114 114
 </div>
115 115
 
116 116
 <div class="well well-blank">
117
-	<div class="sub-header">
118
-		<h3>{% trans "Upload, Change or Remove Images" %}</h3>
119
-	</div>
120
-	{{ image_formset.management_form }}
121
-	{{ image_formset.non_form_errors }}
122
-	<ol class='upload-image'>
123
-		{% for image_form in image_formset %}
124
-			{% include "dashboard/partials/product_images.html" with form=image_form %}
125
-		{% endfor %}
126
-	</ol>
117
+    <div class="sub-header">
118
+        <h3>{% trans "Upload, change or remove images" %}</h3>
119
+    </div>
120
+    {{ image_formset.management_form }}
121
+    {{ image_formset.non_form_errors }}
122
+    <ol class='upload-image'>
123
+        {% for image_form in image_formset %}
124
+            {% include "dashboard/partials/product_images.html" with form=image_form %}
125
+        {% endfor %}
126
+    </ol>
127 127
 </div>
128 128
 <div class="well well-blank fields-full stock-pricing">
129
-	<div class="sub-header">
130
-		<h3>{% trans "Stock and Price Information" %}</h3>
131
-	</div>
132
-	{{ stockrecord_form.non_field_errors }}
133
-	<div class="row-fluid">
134
-		<div class="span3">
135
-			<h4>{% trans "Partner" %}</h4>
136
-			{% for field in stockrecord_form %}
137
-			   {% if "partner" in field.id_for_label %}
138
-				{% include "dashboard/partials/stock_info.html" %}
139
-			   {% endif %}
140
-			{% endfor %}
141
-		</div>
142
-		<div class="span3">
143
-			<h4>{% trans "Price" %}</h4>
144
-			{% for field in stockrecord_form %}
145
-			   {% if "price" in field.id_for_label %}
146
-			       {% include "dashboard/partials/stock_info.html" %}
147
-				{% endif %}
148
-			{% endfor %}
149
-		</div>
150
-		<div class="span3">
151
-			<h4>{% trans "Stock levels" %}</h4>
152
-			{% for field in stockrecord_form %}
153
-				{% if "stock" in field.id_for_label %}
154
-					{% include "dashboard/partials/stock_info.html" %}
155
-				{% endif %}
156
-			{% endfor %}
157
-		</div>
158
-	</div>
129
+    <div class="sub-header">
130
+        <h3>{% trans "Stock and price information" %}</h3>
131
+    </div>
132
+    {{ stockrecord_form.non_field_errors }}
133
+    <div class="row-fluid">
134
+        <div class="span3">
135
+            <h4>{% trans "Partner" %}</h4>
136
+            {% for field in stockrecord_form %}
137
+                {% if "partner" in field.id_for_label %}
138
+                    {% include "dashboard/partials/stock_info.html" %}
139
+                {% endif %}
140
+            {% endfor %}
141
+        </div>
142
+        <div class="span3">
143
+            <h4>{% trans "Price" %}</h4>
144
+            {% for field in stockrecord_form %}
145
+                {% if "price" in field.id_for_label %}
146
+                    {% include "dashboard/partials/stock_info.html" %}
147
+                {% endif %}
148
+            {% endfor %}
149
+        </div>
150
+        <div class="span3">
151
+            <h4>{% trans "Stock levels" %}</h4>
152
+            {% for field in stockrecord_form %}
153
+                {% if "stock" in field.id_for_label %}
154
+                    {% include "dashboard/partials/stock_info.html" %}
155
+                {% endif %}
156
+            {% endfor %}
157
+        </div>
158
+    </div>
159 159
 </div>
160 160
 <hr/>
161
-    <div class="control-group">
162
-        <div class="pull-right">
163
-            <a href="{% url dashboard:catalogue-product-list %}">Cancel</a> or <button class="btn btn-primary btn-large" type="submit">{% trans "Save Product" %}</button>
164
-        </div>
165
-        {% if product %}
166
-            <a class="btn btn-success btn-large" href="{{ product.get_absolute_url }}">{% trans "View on site" %}</a>
167
-        {% endif %}
161
+<div class="control-group">
162
+    <div class="pull-right">
163
+        <a href="{% url dashboard:catalogue-product-list %}">{% trans "Cancel" %}</a> {% trans "or" %} <button class="btn btn-primary btn-large" type="submit">{% trans "Save Product" %}</button>
164
+    </div>
165
+    {% if product %}
166
+        <a class="btn btn-success btn-large" href="{{ product.get_absolute_url }}">{% trans "View on site" %}</a>
167
+    {% endif %}
168 168
 </div>
169 169
 </form>
170 170
 {% endblock dashboard_content %}

+ 1
- 1
oscar/templates/oscar/dashboard/catalogue/stockalert_list.html Vedi File

@@ -14,7 +14,7 @@
14 14
 	<a href="{% url dashboard:index %}">{% trans "Dashboard" %}</a>
15 15
         <span class="divider">/</span>
16 16
     </li>
17
-	<li class="active"><a href=".">{% trans "Catalogue" %}</a></li>
17
+	<li class="active"><a href=".">{% trans "Stock alerts" %}</a></li>
18 18
 </ul>
19 19
 {% endblock %}
20 20
 

+ 27
- 27
oscar/templates/oscar/dashboard/layout.html Vedi File

@@ -5,7 +5,7 @@
5 5
 {% load i18n %}
6 6
 
7 7
 {% block mainstylesheet %}
8
-	<link rel="stylesheet" href="{{ STATIC_URL }}oscar/css/dashboard.css" />
8
+    <link rel="stylesheet" href="{{ STATIC_URL }}oscar/css/dashboard.css" />
9 9
 {% endblock %}
10 10
 
11 11
 {% block extrahead %}
@@ -16,51 +16,51 @@
16 16
 {% endblock %}
17 17
 
18 18
 {% block layout %}
19
-	{% block navbar %}
19
+    {% block navbar %}
20 20
     <div class="navbar navbar-fixed-top">
21 21
         <div class="navbar-inner">
22 22
             <div class="container" style="width: auto;">
23
-				<a href="{% url promotions:home %}" class="brand">{{ shop_name }}</a>
23
+                <a href="{% url promotions:home %}" class="brand">{{ shop_name }}</a>
24 24
                 <ul class="nav pull-right">
25 25
                     {% if user.is_authenticated %}
26 26
                         <li><span>Welcome <em>{{ request.user.get_full_name|default:'Guest' }}</em></span></li>
27
-						<li><a href="{% url customer:summary %}" class="app-ico ico_profile">{% trans "Account" %}</a></li>
28
-						<li><a href="{% url customer:logout %}" class="app-ico ico_logout">{% trans "Logout" %}</a></li>
27
+                        <li><a href="{% url customer:summary %}" class="app-ico ico_profile">{% trans "Account" %}</a></li>
28
+                        <li><a href="{% url customer:logout %}" class="app-ico ico_logout">{% trans "Logout" %}</a></li>
29 29
                     {% else %}
30
-					<li><a href="{% url customer:login %}" class="app-ico ico_logout">{% trans "Login" %}</a></li>
30
+                    <li><a href="{% url customer:login %}" class="app-ico ico_logout">{% trans "Login" %}</a></li>
31 31
                     {% endif %}
32 32
                 </ul>
33 33
             </div>
34 34
         </div><!-- /navbar-inner -->
35 35
     </div><!-- /navbar -->
36
-	{% endblock navbar %}
36
+    {% endblock navbar %}
37 37
 
38 38
     <div class="container-fluid dashboard">
39 39
         {% block dashboard_nav %}
40 40
         <div class="row-fluid">
41 41
             {% dashboard_navigation request.user %}
42
-			<div class="subnav subnav-fixed">
42
+            <div class="subnav subnav-fixed">
43 43
                 <ul class="nav nav-pills">
44
-                    {% for item in nav_items %}	
44
+                    {% for item in nav_items %}
45 45
                         <li class="{{ item.label }} dropdown">
46
-            			{% if item.is_heading %}
47
-        			        <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ item.label }} <b class="caret"></b></a>
48
-            			{% else %}
49
-            			    <a href="{{ item.url }}">{{ item.label }}</a>
50
-            			{% endif %}
51
-            			{% if item.has_children %}
52
-            			    <ul class="dropdown-menu">
53
-            				    {% for subitem in item.children %}
54
-            				    <li><a href="{{ subitem.url }}">{{ subitem.label }}</a></li>
55
-            				    {% endfor %}
56
-            			    </ul>
57
-            			{% endif %}
58
-            			</li>
59
-        			{% endfor %}
46
+                        {% if item.is_heading %}
47
+                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ item.label }} <b class="caret"></b></a>
48
+                        {% else %}
49
+                            <a href="{{ item.url }}">{{ item.label }}</a>
50
+                        {% endif %}
51
+                        {% if item.has_children %}
52
+                            <ul class="dropdown-menu">
53
+                                {% for subitem in item.children %}
54
+                                <li><a href="{{ subitem.url }}">{{ subitem.label }}</a></li>
55
+                                {% endfor %}
56
+                            </ul>
57
+                        {% endif %}
58
+                        </li>
59
+                    {% endfor %}
60 60
                 </ul>
61 61
             </div>
62
-        </div>
63
-        {% endblock %}
62
+		</div>
63
+		{% endblock %}
64 64
 
65 65
         {% block breadcrumbs %}
66 66
         <ul class="breadcrumb">
@@ -83,9 +83,9 @@
83 83
 {# Block for additional scripts #}
84 84
 {% block extrascripts %}
85 85
     {{ block.super }}
86
-	<script src="{{ STATIC_URL }}oscar/js/plugins/plugins.js" type="text/javascript" charset="utf-8"></script>
86
+    <script src="{{ STATIC_URL }}oscar/js/plugins/plugins.js" type="text/javascript" charset="utf-8"></script>
87 87
     <script src="{{ STATIC_URL }}oscar/js/oscar/ui.js" type="text/javascript" charset="utf-8"></script>
88 88
     <script src="{{ STATIC_URL }}oscar/js/oscar/dashboard.js" type="text/javascript" charset="utf-8"></script>
89 89
     <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
90
-	<script type="text/javascript">$(oscar.dashboard.init);</script>
90
+    <script type="text/javascript">$(oscar.dashboard.init);</script>
91 91
 {% endblock %}

+ 48
- 48
oscar/templates/oscar/dashboard/offers/offer_list.html Vedi File

@@ -9,10 +9,10 @@
9 9
 {% block breadcrumbs %}
10 10
 <ul class="breadcrumb">
11 11
     <li>
12
-	<a href="{% url promotions:home %}">{% trans "Dashboard" %}</a>
12
+    <a href="{% url promotions:home %}">{% trans "Dashboard" %}</a>
13 13
         <span class="divider">/</span>
14 14
     </li>
15
-    <li class="active"><a href=".">Offers &amp; promotions</a></li>
15
+    <li class="active"><a href=".">{% trans "Offer management" %}</a></li>
16 16
 </ul>
17 17
 {% endblock %}
18 18
 
@@ -22,59 +22,59 @@
22 22
 {% block dashboard_content %}
23 23
 <div class="well well-info">
24 24
     <div class="sub-header">
25
-		<h3>{% trans "Search" %}</h3>
25
+        <h3>{% trans "Search" %}</h3>
26 26
     </div>
27 27
     <form action="." method="get" class="form-inline">
28
-		{% include 'partials/form_fields_inline.html' with form=form %}
29
-		<button type="submit" class="btn btn-primary">{% trans "Search" %}</button>
30
-		<a href="{% url dashboard:offer-list %}" class="btn">{% trans "Reset" %}</a>
28
+        {% include 'partials/form_fields_inline.html' with form=form %}
29
+        <button type="submit" class="btn btn-primary">{% trans "Search" %}</button>
30
+        <a href="{% url dashboard:offer-list %}" class="btn">{% trans "Reset" %}</a>
31 31
     </form>
32 32
 </div>
33 33
 
34 34
 <div class="well well-success">
35 35
     <h3>{% trans "Create Offer" %}</h3>
36
-   	<a href="{% url dashboard:offer-metadata %}" class="btn btn-primary">Create</a>
36
+    <a href="{% url dashboard:offer-metadata %}" class="btn btn-primary">{% trans "Create" %}</a>
37 37
 </div>
38 38
 
39
-	<div class="sub-header">
40
-		<h2>{{ queryset_description }}</h2>
41
-	</div>
42
-	{% if offers.count %}
43
-		<form action="." method="post" class="order_table">
44
-			{% csrf_token %}
45
-			<table class="table table-striped table-bordered">
46
-				<tr>
47
-					<th>{% trans "Offer name" %}</th>
48
-					<th>{% trans "Status" %}</th>
49
-					<th>{% trans "Start date" %}</th>
50
-					<th>{% trans "End date" %}</th>
51
-					<th>{% trans "Condition" %}</th>
52
-					<th>{% trans "Benefit" %}</th>
53
-					<th>{% trans "Date created" %}</th>
54
-					<th></th>
55
-				</tr>
56
-				{% for offer in offers %}
57
-				<tr>
58
-					<td><a href="{{ offer.get_absolute_url }}">{{ offer.name }}</a></td>
59
-					<td>{% if offer.is_active %}{% trans "Active" %}{% else %}{% trans "Inactive" %}{% endif %}</td>
60
-					<td>{{ offer.start_date }}</td>
61
-					<td>{{ offer.end_date }}</td>
62
-					<td>{{ offer.condition.description }}</td>
63
-					<td>{{ offer.benefit.description }}</td>
64
-					<td>{{ offer.date_created }}</td>
65
-					<td>
66
-						<a class="btn btn-info" href="{% url dashboard:offer-detail offer.pk %}">{% trans "Stats" %}</a>
67
-						<a class="btn btn-primary" href="{% url dashboard:offer-metadata offer.pk %}">{% trans "Edit" %}</a>
68
-						<a class="btn btn-danger" href="{% url dashboard:offer-delete offer.pk %}">{% trans "Delete" %}</a>
69
-					</td>
70
-				</tr>
71
-				{% endfor %}
72
-			</table>
73
-			{% if page_obj %}
74
-				{% include "partials/pagination.html" %}
75
-			{% endif %}
76
-		</form>
77
-	{% else %}
78
-	<p>{% trans "No offers found." %}</p>
79
-	{% endif %}
39
+    <div class="sub-header">
40
+        <h2>{{ queryset_description }}</h2>
41
+    </div>
42
+    {% if offers.count %}
43
+        <form action="." method="post" class="order_table">
44
+            {% csrf_token %}
45
+            <table class="table table-striped table-bordered">
46
+                <tr>
47
+                    <th>{% trans "Offer name" %}</th>
48
+                    <th>{% trans "Status" %}</th>
49
+                    <th>{% trans "Start date" %}</th>
50
+                    <th>{% trans "End date" %}</th>
51
+                    <th>{% trans "Condition" %}</th>
52
+                    <th>{% trans "Benefit" %}</th>
53
+                    <th>{% trans "Date created" %}</th>
54
+                    <th></th>
55
+                </tr>
56
+                {% for offer in offers %}
57
+                <tr>
58
+                    <td><a href="{{ offer.get_absolute_url }}">{{ offer.name }}</a></td>
59
+                    <td>{% if offer.is_active %}{% trans "Active" %}{% else %}{% trans "Inactive" %}{% endif %}</td>
60
+                    <td>{{ offer.start_date }}</td>
61
+                    <td>{{ offer.end_date }}</td>
62
+                    <td>{{ offer.condition.description }}</td>
63
+                    <td>{{ offer.benefit.description }}</td>
64
+                    <td>{{ offer.date_created }}</td>
65
+                    <td>
66
+                        <a class="btn btn-info" href="{% url dashboard:offer-detail offer.pk %}">{% trans "Stats" %}</a>
67
+                        <a class="btn btn-primary" href="{% url dashboard:offer-metadata offer.pk %}">{% trans "Edit" %}</a>
68
+                        <a class="btn btn-danger" href="{% url dashboard:offer-delete offer.pk %}">{% trans "Delete" %}</a>
69
+                    </td>
70
+                </tr>
71
+                {% endfor %}
72
+            </table>
73
+            {% if page_obj %}
74
+                {% include "partials/pagination.html" %}
75
+            {% endif %}
76
+        </form>
77
+    {% else %}
78
+    <p>{% trans "No offers found." %}</p>
79
+    {% endif %}
80 80
 {% endblock dashboard_content %}

+ 7
- 10
oscar/templates/oscar/dashboard/orders/order_list.html Vedi File

@@ -36,15 +36,15 @@
36 36
                     {{ field }}
37 37
                     {% for error in field.errors %}
38 38
                         <ul class="help-block">
39
-                            <li>{{ error|escape }}</li>
39
+                            <li>{{ error }}</li>
40 40
                         </ul>
41 41
                     {% endfor %}
42 42
                 </span>
43 43
                 {% endif %}
44 44
             {% endif %}
45 45
         {% endfor %}
46
-        <input type="submit" value="Search" class="btn btn-primary" />
47
-        <a data-toggle="modal" href="#SearchModal">Advanced Search</a>
46
+        <input type="submit" value="{% trans "Search" %}" class="btn btn-primary" />
47
+        <a data-toggle="modal" href="#SearchModal">{% trans "Advanced Search" %}</a>
48 48
     </form>
49 49
 
50 50
     <div class="modal hide fade" id="SearchModal">
@@ -58,7 +58,7 @@
58 58
                 {% include "partials/form_fields.html" with form=form %}
59 59
             </div>
60 60
             <div class="modal-footer">
61
-                <a href="#" class="btn" data-dismiss="modal">Close</a>
61
+                <a href="#" class="btn" data-dismiss="modal">{% trans "Close" %}</a>
62 62
                 <button type="submit" class="btn btn-primary">{% trans "Search" %}</button>
63 63
             </div>
64 64
         </form>
@@ -74,7 +74,7 @@
74 74
 <div class="tabbable dashboard">
75 75
     <ul class="nav nav-tabs">
76 76
         <li {% if not active_status %}class="active"{% endif %}>
77
-            <a href="{% url dashboard:order-list %}">All Orders</a>
77
+            <a href="{% url dashboard:order-list %}">{% trans "All Orders" %}</a>
78 78
         </li>
79 79
         {% for slug, name in status_lookup.items %}
80 80
         <li {% if slug == active_status %}class="active"{% endif %}>
@@ -93,7 +93,7 @@
93 93
     <tr>
94 94
         <th>
95 95
 			<input name="select_all_orders" type="checkbox">
96
-            Select all
96
+            {% trans "Select all" %}
97 97
 		</th>
98 98
         <th>{% anchor 'number' 'Order number' %}</th>
99 99
 		<th>{% trans "Total inc tax" %}</th>
@@ -131,10 +131,7 @@
131 131
 </div>
132 132
 
133 133
 {% include "dashboard/orders/partials/bulk_edit_form.html" with status=active_status %}
134
-
135
-{% if page_obj %}
136
-    {% include "partials/pagination.html" %}
137
-{% endif %}
134
+{% include "partials/pagination.html" %}
138 135
 
139 136
 </form>
140 137
 

+ 30
- 36
oscar/templates/oscar/dashboard/pages/index.html Vedi File

@@ -10,10 +10,10 @@
10 10
 {% block breadcrumbs %}
11 11
 <ul class="breadcrumb">
12 12
     <li>
13
-	<a href="{% url dashboard:index %}">{% trans "Dashboard" %}</a>
13
+    <a href="{% url dashboard:index %}">{% trans "Dashboard" %}</a>
14 14
         <span class="divider">/</span>
15 15
     </li>
16
-	<li class="active"><a href=".">{% trans "Pages" %}</a></li>
16
+    <li class="active"><a href=".">{% trans "Pages" %}</a></li>
17 17
 </ul>
18 18
 {% endblock %}
19 19
 
@@ -32,7 +32,7 @@
32 32
 <div class="well well-success">
33 33
     <h3>Create new page</h3>
34 34
     <form action="{% url dashboard:page-create %}" method="get" class="form-inline">
35
-            <input type="submit" value="Create" class="btn-primary" />
35
+        <input type="submit" value="{% trans "Create" %}" class="btn-primary" />
36 36
     </form>
37 37
 </div>
38 38
 
@@ -42,40 +42,34 @@
42 42
 
43 43
 
44 44
 {% if flatpage_list.count %}
45
-<form action="." method="post">
46
-    {% csrf_token %}
47
-<table class="table table-striped table-bordered">
48
-	<thead>
49
-    <tr>
50
-		<th>{% trans "Title" %}</th>
51
-		<th>{% trans "URL" %}</th>
52
-        <th></th>
53
-    </tr>
54
-	</thead>
55
-	<tbody>
56
-    {% for page in flatpage_list %}
57
-    <tr>
58
-        <td>{{ page.title}}</td>
59
-        <td>{{ page.url}}</td>
60
-        <td>
61
-			<a class="btn btn-info" href="{{ page.get_absolute_url }}">{% trans "View" %}</a>
62
-			<a class="btn btn-success" href="{% url dashboard:page-update page.id %}">{% trans "Edit" %}</a>
63
-			<a class="btn btn-danger" href="{% url dashboard:page-delete page.id %}">{% trans "Delete" %}</a>
64
-        </td>
65
-    </tr>
66
-</tbody>
67
-    {% endfor %}
68
-</table>
69
-
70
-{% if page_obj %}
71
-    {% include "partials/pagination.html" %}
72
-{% endif %}
73
-</form>
74
-
45
+    <form action="." method="post">
46
+        {% csrf_token %}
47
+        <table class="table table-striped table-bordered">
48
+            <thead>
49
+                <tr>
50
+                    <th>{% trans "Title" %}</th>
51
+                    <th>{% trans "URL" %}</th>
52
+                    <th></th>
53
+                </tr>
54
+            </thead>
55
+            <tbody>
56
+            {% for page in flatpage_list %}
57
+            <tr>
58
+                <td>{{ page.title}}</td>
59
+                <td>{{ page.url}}</td>
60
+                <td>
61
+                    <a class="btn btn-info" href="{{ page.get_absolute_url }}">{% trans "View" %}</a>
62
+                    <a class="btn btn-success" href="{% url dashboard:page-update page.id %}">{% trans "Edit" %}</a>
63
+                    <a class="btn btn-danger" href="{% url dashboard:page-delete page.id %}">{% trans "Delete" %}</a>
64
+                </td>
65
+            </tr>
66
+            {% endfor %}
67
+            </tbody>
68
+        </table>
69
+        {% include "partials/pagination.html" %}
70
+    </form>
75 71
 {% else %}
76
-
77
-<p>{% trans "No pages found." %}</p>
78
-
72
+    <p>{% trans "No pages found." %}</p>
79 73
 {% endif %}
80 74
 
81 75
 {% endblock dashboard_content %}

+ 3
- 3
oscar/templates/oscar/dashboard/pages/update.html Vedi File

@@ -46,9 +46,9 @@
46 46
 	                        <div class="controls">
47 47
 	                            {{ field }}
48 48
 	                            {% for error in field.errors %}
49
-							<span class="help-block">
50
-								{{ error|escape }}
51
-							</span>
49
+	                				<span class="help-block">
50
+								{{ error }}
51
+	                				</span>
52 52
 	                            {% endfor %}
53 53
 	                            {% if field.help_text %}
54 54
 	                                <span class='help-block'>

+ 32
- 30
oscar/templates/oscar/dashboard/ranges/range_list.html Vedi File

@@ -22,38 +22,40 @@
22 22
 {% block dashboard_content %}
23 23
 <div class="well well-success">
24 24
 	<div class="sub-header">
25
-		<h2>Create new range</h2>
25
+        <h2>{% trans "Create new range" %}</h2>
26 26
 	</div>
27 27
 	<a href="{% url dashboard:range-create %}" class="btn btn-primary">{% trans "Create new range" %}</a>
28 28
 </div>
29 29
 
30
-	{% if ranges.count %}
31
-		<table class="table table-striped table-bordered">
32
-			<tr>
33
-				<th>{% trans "Name" %}</th>
34
-				<th>{% trans "Num products" %}</th>
35
-				<th>{% trans "Date created" %}</th>
36
-				<th></th>
37
-			</tr>
38
-			{% for range in ranges %}
39
-			<tr>
40
-				<td>{{ range.name }}</td>
41
-				<td>{{ range.num_products|default:"-" }}</td>
42
-				<td>{{ range.date_created }}</td>
43
-				<td>
44
-					<a class="btn btn-primary" href="{% url dashboard:range-update range.id %}">{% trans "Edit" %}</a>
45
-					{% if not range.includes_all_products %}
46
-					<a class="btn btn-info" href="{% url dashboard:range-products range.id %}">{% trans "Edit products" %}</a>
47
-					{% endif %}
48
-					<a class="btn btn-danger" href="{% url dashboard:range-delete range.id %}">{% trans "Delete" %}</a>
49
-				</td>
50
-			</tr>
51
-			{% endfor %}
52
-		</table>
53
-		{% if page_obj %}
54
-			{% include "partials/pagination.html" %}
55
-		{% endif %}
56
-	{% else %}
57
-	<p>{% trans "No ranges found." %}</p>
58
-	{% endif %}
30
+{% if ranges.count %}
31
+    <table class="table table-striped table-bordered">
32
+        <thead>
33
+            <tr>
34
+                <th>{% trans "Name" %}</th>
35
+                <th>{% trans "Num products" %}</th>
36
+                <th>{% trans "Date created" %}</th>
37
+                <th></th>
38
+            </tr>
39
+        </thead>
40
+        <tbody>
41
+        {% for range in ranges %}
42
+        <tr>
43
+            <td>{{ range.name }}</td>
44
+            <td>{{ range.num_products|default:"-" }}</td>
45
+            <td>{{ range.date_created }}</td>
46
+            <td>
47
+                <a class="btn btn-primary" href="{% url dashboard:range-update range.id %}">{% trans "Edit" %}</a>
48
+                {% if not range.includes_all_products %}
49
+                <a class="btn btn-info" href="{% url dashboard:range-products range.id %}">{% trans "Edit products" %}</a>
50
+                {% endif %}
51
+                <a class="btn btn-danger" href="{% url dashboard:range-delete range.id %}">{% trans "Delete" %}</a>
52
+            </td>
53
+        </tr>
54
+        {% endfor %}
55
+        </tbody>
56
+    </table>
57
+    {% include "partials/pagination.html" %}
58
+{% else %}
59
+    <p>{% trans "No ranges found." %}</p>
60
+{% endif %}
59 61
 {% endblock dashboard_content %}

+ 39
- 47
oscar/templates/oscar/dashboard/users/index.html Vedi File

@@ -35,58 +35,50 @@
35 35
   <strong>{{ queryset_description }}</strong>
36 36
 </div>
37 37
 {% endif %}
38
-<div class="well well-danger">
39
-	<h3 class="app-ico ico-download icon">Export 2 filtered customers to a .csv file.</h3>
40
-	<input type="submit" value="Export" class="btn btn-primary"/>
41
-</div>
42 38
 
43 39
 {% if user_list.count %}
44 40
 <form action="." method="post" class="form-inline">
45 41
     {% csrf_token %}
46
-
47
-<table class="table table-striped table-bordered">
48
-    <tr>
49
-        <th></th>
50
-		<th>{% trans "Email" %}</th>
51
-		<th>{% trans "Name (First, Last)" %}</th>
52
-		<th>{% trans "Active" %}</th>
53
-		<th>{% trans "Staff status" %}</th>
54
-		<th>{% trans "Date registered" %}</th>
55
-		<th>{% trans "Num Orders" %}</th>
56
-        <th></th>
57
-    </tr>
58
-    {% for user in user_list %}
59
-    <tr>
60
-        <td><input type="checkbox" name="selected_user" class="selected_user" value="{{ user.id }}"/>
61
-        <td>{{ user.email }}</td>
62
-		<td>{{ user.first_name }}, {{ user.last_name }}</td>
63
-        <td>{{ user.is_active }}</td>
64
-        <td>{{ user.is_staff }}</td>
65
-        <td>{{ user.date_joined|date:"d/m/y H:s" }}</td>
66
-        <td>{% num_orders user %}</td>
67
-        <td>
68
-			<a href="{% url dashboard:user-detail user.id %}" class="btn btn-info">{% trans "View" %}</a>
69
-        </td>
70
-    </tr>
71
-    {% endfor %}
72
-</table>
73
-<div class="well">
74
-    <h3 class="app-ico ico_sync icon">Bulk Actions</h3>
75
-    <label for="inlineCheckboxes">With selected customers:</label>
76
-    <label>
77
-        <input type="radio" name="action" value="make_active" /> Make active
78
-    </label>
79
-    <label>
80
-        <input type="radio" name="action" value="make_inactive" /> Make inactive
81
-    </label>
82
-    <input type="submit" value="Go!" class="btn btn-primary" />
83
-</div>
84
-{% if page_obj %}
42
+    <table class="table table-striped table-bordered">
43
+        <tr>
44
+            <th></th>
45
+            <th>{% trans "Email" %}</th>
46
+            <th>{% trans "First name" %}</th>
47
+            <th>{% trans "Last name" %}</th>
48
+            <th>{% trans "Active" %}</th>
49
+            <th>{% trans "Staff status" %}</th>
50
+            <th>{% trans "Date registered" %}</th>
51
+            <th>{% trans "Num Orders" %}</th>
52
+            <th></th>
53
+        </tr>
54
+        {% for user in user_list %}
55
+        <tr>
56
+            <td><input type="checkbox" name="selected_user" class="selected_user" value="{{ user.id }}"/>
57
+            <td>{{ user.email }}</td>
58
+            <td>{{ user.first_name }}</td>
59
+            <td>{{ user.last_name }}</td>
60
+            <td>{{ user.is_active }}</td>
61
+            <td>{{ user.is_staff }}</td>
62
+            <td>{{ user.date_joined|date:"d/m/y H:s" }}</td>
63
+            <td>{% num_orders user %}</td>
64
+            <td>
65
+                <a href="{% url dashboard:user-detail user.id %}" class="btn btn-info">{% trans "View" %}</a>
66
+            </td>
67
+        </tr>
68
+        {% endfor %}
69
+    </table>
70
+    <div class="well">
71
+        <h3 class="app-ico ico_sync icon">{% trans "Bulk Actions" %}</h3>
72
+        <label for="inlineCheckboxes">{% trans "With selected customers:" %}</label>
73
+        <label>
74
+            <input type="radio" name="action" value="make_active" /> {% trans "Make active" %}
75
+        </label>
76
+        <label>
77
+            <input type="radio" name="action" value="make_inactive" /> {% trans "Make inactive" %}
78
+        </label>
79
+        <input type="submit" value="{% trans "Go!" %}" class="btn btn-primary" />
80
+    </div>
85 81
     {% include "catalogue/partials/pagination.html" %}
86
-{% endif %}
87
-
88
-
89
-
90 82
 </form>
91 83
 
92 84
 {% else %}

+ 2
- 4
oscar/templates/oscar/dashboard/vouchers/voucher_list.html Vedi File

@@ -33,7 +33,7 @@
33 33
 
34 34
 <div class="well well-success">
35 35
 	<div class="sub-header">
36
-		<h3>Create a new voucher</h3>
36
+        <h3>{% trans "Create a new voucher" %}</h3>
37 37
 	</div>
38 38
 	<a href="{% url dashboard:voucher-create %} " class="btn btn-primary">{% trans "Create new voucher" %}</a>
39 39
 </div>
@@ -71,9 +71,7 @@
71 71
 			</tr>
72 72
 			{% endfor %}
73 73
 		</table>
74
-		{% if page_obj %}
75
-			{% include "partials/pagination.html" %}
76
-		{% endif %}
74
+        {% include "partials/pagination.html" %}
77 75
 	{% else %}
78 76
 	<p>{% trans "No vouchers found." %}</p>
79 77
 	{% endif %}

+ 0
- 285
sites/sandbox/settings_simple.py Vedi File

@@ -1,285 +0,0 @@
1
-import os
2
-
3
-# Django settings for oscar project.
4
-PROJECT_DIR = os.path.dirname(__file__)
5
-location = lambda x: os.path.join(
6
-    os.path.dirname(os.path.realpath(__file__)), x)
7
-
8
-DEBUG = True
9
-TEMPLATE_DEBUG = True
10
-SQL_DEBUG = True
11
-SEND_BROKEN_LINK_EMAILS = True
12
-
13
-ADMINS = (
14
-    ('David Winterbottom', 'david.winterbottom@tangentlabs.co.uk'),
15
-)
16
-EMAIL_SUBJECT_PREFIX = '[Oscar sandbox] '
17
-EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
18
-
19
-MANAGERS = ADMINS
20
-
21
-DATABASES = {
22
-    'default': {
23
-        'ENGINE': 'django.db.backends.sqlite3',
24
-        'NAME': os.path.join(os.path.dirname(__file__), 'db.sqlite'),
25
-        'USER': '',
26
-        'PASSWORD': '',
27
-        'HOST': '',
28
-        'PORT': '',
29
-    }
30
-}
31
-
32
-CACHES = {
33
-    'default': {
34
-        'BACKEND':
35
-        'django.core.cache.backends.memcached.MemcachedCache',
36
-        'LOCATION': '127.0.0.1:11211',
37
-    }
38
-}
39
-
40
-# Local time zone for this installation. Choices can be found here:
41
-# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
42
-# although not all choices may be available on all operating systems.
43
-# On Unix systems, a value of None will cause Django to use the same
44
-# timezone as the operating system.
45
-# If running in a Windows environment this must be set to the same as your
46
-# system time zone.
47
-TIME_ZONE = 'Europe/London'
48
-
49
-# Language code for this installation. All choices can be found here:
50
-# http://www.i18nguy.com/unicode/language-identifiers.html
51
-LANGUAGE_CODE = 'en-us'
52
-
53
-LANGUAGES = (
54
-    ('de', 'German'),
55
-    ('fr', 'French'),
56
-)
57
-ROSETTA_STORAGE_CLASS = 'rosetta.storage.SessionRosettaStorage'
58
-ROSETTA_ENABLE_TRANSLATION_SUGGESTIONS = True
59
-
60
-SITE_ID = 1
61
-
62
-# If you set this to False, Django will make some optimizations so as not
63
-# to load the internationalization machinery.
64
-USE_I18N = True
65
-
66
-# If you set this to False, Django will not format dates, numbers and
67
-# calendars according to the current locale
68
-USE_L10N = True
69
-
70
-# Absolute path to the directory that holds media.
71
-# Example: "/home/media/media.lawrence.com/"
72
-MEDIA_ROOT = location("assets/media")
73
-
74
-# URL that handles the media served from MEDIA_ROOT. Make sure to use a
75
-# trailing slash if there is a path component (optional in other cases).
76
-# Examples: "http://media.lawrence.com", "http://example.com/media/"
77
-MEDIA_URL = '/media/'
78
-
79
-# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
80
-# trailing slash.
81
-# Examples: "http://foo.com/media/", "/media/".
82
-#ADMIN_MEDIA_PREFIX = '/media/admin/'
83
-
84
-STATIC_URL = '/static/'
85
-STATICFILES_DIRS = ()
86
-STATIC_ROOT = location('public/static')
87
-
88
-# Make this unique, and don't share it with anybody.
89
-SECRET_KEY = '$)a7n&o80u!6y5t-+jrd3)3!%vh&shg$wqpjpxc!ar&p#!)n1a'
90
-
91
-# List of callables that know how to import templates from various sources.
92
-TEMPLATE_LOADERS = (
93
-    'django.template.loaders.filesystem.Loader',
94
-    'django.template.loaders.app_directories.Loader',
95
-#     'django.template.loaders.eggs.Loader',
96
-)
97
-
98
-TEMPLATE_CONTEXT_PROCESSORS = (
99
-    "django.contrib.auth.context_processors.auth",
100
-    "django.core.context_processors.request",
101
-    "django.core.context_processors.debug",
102
-    "django.core.context_processors.i18n",
103
-    "django.core.context_processors.media",
104
-    "django.core.context_processors.static",
105
-    "django.contrib.messages.context_processors.messages",
106
-    # Oscar specific
107
-    'oscar.apps.search.context_processors.search_form',
108
-    'oscar.apps.promotions.context_processors.promotions',
109
-    'oscar.apps.checkout.context_processors.checkout',
110
-    'oscar.core.context_processors.metadata',
111
-)
112
-
113
-MIDDLEWARE_CLASSES = (
114
-    'django.middleware.common.CommonMiddleware',
115
-    'django.contrib.sessions.middleware.SessionMiddleware',
116
-    'django.middleware.csrf.CsrfViewMiddleware',
117
-    'django.contrib.auth.middleware.AuthenticationMiddleware',
118
-    'django.contrib.messages.middleware.MessageMiddleware',
119
-    'django.middleware.transaction.TransactionMiddleware',
120
-    'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
121
-    'debug_toolbar.middleware.DebugToolbarMiddleware',
122
-    'oscar.apps.basket.middleware.BasketMiddleware',
123
-)
124
-
125
-INTERNAL_IPS = ('127.0.0.1',)
126
-
127
-ROOT_URLCONF = 'urls'
128
-
129
-from oscar import OSCAR_MAIN_TEMPLATE_DIR
130
-TEMPLATE_DIRS = (
131
-    location('templates'),
132
-    OSCAR_MAIN_TEMPLATE_DIR,
133
-)
134
-
135
-# A sample logging configuration. The only tangible logging
136
-# performed by this configuration is to send an email to
137
-# the site admins on every HTTP 500 error.
138
-# See http://docs.djangoproject.com/en/dev/topics/logging for
139
-# more details on how to customize your logging configuration.
140
-LOGGING = {
141
-    'version': 1,
142
-    'disable_existing_loggers': False,
143
-    'formatters': {
144
-        'verbose': {
145
-            'format': '%(levelname)s %(asctime)s %(module)s %(message)s',
146
-        },
147
-        'simple': {
148
-            'format': '[%(asctime)s] %(message)s'
149
-        },
150
-    },
151
-    'handlers': {
152
-        'null': {
153
-            'level': 'DEBUG',
154
-            'class': 'django.utils.log.NullHandler',
155
-        },
156
-        'console': {
157
-            'level': 'DEBUG',
158
-            'class': 'logging.StreamHandler',
159
-            'formatter': 'verbose'
160
-        },
161
-        'checkout_file': {
162
-             'level': 'INFO',
163
-             'class': 'oscar.core.logging.handlers.EnvFileHandler',
164
-             'filename': 'checkout.log',
165
-             'formatter': 'verbose'
166
-        },
167
-        'gateway_file': {
168
-             'level': 'INFO',
169
-             'class': 'oscar.core.logging.handlers.EnvFileHandler',
170
-             'filename': 'gateway.log',
171
-             'formatter': 'simple'
172
-        },
173
-        'error_file': {
174
-             'level': 'INFO',
175
-             'class': 'oscar.core.logging.handlers.EnvFileHandler',
176
-             'filename': 'errors.log',
177
-             'formatter': 'verbose'
178
-        },
179
-        'mail_admins': {
180
-            'level': 'ERROR',
181
-            'class': 'django.utils.log.AdminEmailHandler',
182
-        },
183
-    },
184
-    'loggers': {
185
-        'django': {
186
-            'handlers': ['null'],
187
-            'propagate': True,
188
-            'level': 'INFO',
189
-        },
190
-        'django.request': {
191
-            'handlers': ['mail_admins', 'error_file'],
192
-            'level': 'ERROR',
193
-            'propagate': False,
194
-        },
195
-        'oscar.checkout': {
196
-            'handlers': ['console', 'checkout_file'],
197
-            'propagate': True,
198
-            'level': 'INFO',
199
-        },
200
-        'gateway': {
201
-            'handlers': ['gateway_file'],
202
-            'propagate': True,
203
-            'level': 'INFO',
204
-        },
205
-        'django.db.backends': {
206
-            'handlers': ['null'],
207
-            'propagate': False,
208
-            'level': 'DEBUG',
209
-        },
210
-    }
211
-}
212
-
213
-
214
-INSTALLED_APPS = [
215
-    'django.contrib.auth',
216
-    'django.contrib.contenttypes',
217
-    'django.contrib.sessions',
218
-    'django.contrib.sites',
219
-    'django.contrib.messages',
220
-    'django.contrib.admin',
221
-    'django.contrib.flatpages',
222
-    'django.contrib.staticfiles',
223
-    'django_extensions',
224
-    'debug_toolbar',
225
-    'south',
226
-    'rosetta',  # For i18n testing
227
-    'apps.user',  # For profile testing
228
-    'apps.gateway',  # For allowing dashboard access
229
-]
230
-from oscar import get_core_apps
231
-INSTALLED_APPS = INSTALLED_APPS + get_core_apps()
232
-
233
-AUTHENTICATION_BACKENDS = (
234
-    'oscar.apps.customer.auth_backends.Emailbackend',
235
-    'django.contrib.auth.backends.ModelBackend',
236
-)
237
-
238
-LOGIN_REDIRECT_URL = '/accounts/'
239
-APPEND_SLASH = True
240
-
241
-# Haystack settings
242
-HAYSTACK_CONNECTIONS = {
243
-    'default': {
244
-        'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
245
-        'PATH': os.path.join(os.path.dirname(__file__), 'whoosh_index'),
246
-    },
247
-}
248
-
249
-DEBUG_TOOLBAR_CONFIG = {
250
-    'INTERCEPT_REDIRECTS': False,
251
-}
252
-
253
-AUTH_PROFILE_MODULE = 'user.Profile'
254
-
255
-# Oscar settings
256
-from oscar.defaults import *
257
-
258
-
259
-OSCAR_RECENTLY_VIEWED_PRODUCTS = 20
260
-OSCAR_ALLOW_ANON_CHECKOUT = True
261
-OSCAR_INITIAL_ORDER_STATUS = 'Pending'
262
-OSCAR_INITIAL_LINE_STATUS = 'Pending'
263
-OSCAR_ORDER_STATUS_PIPELINE = {
264
-    'Pending': ('Being processed', 'Cancelled',),
265
-    'Being processed': ('Processed', 'Cancelled',),
266
-    'Cancelled': (),
267
-}
268
-
269
-OSCAR_SHOP_NAME = 'Oscar Sandbox'
270
-OSCAR_SHOP_TAGLINE = 'e-Commerce for Django'
271
-
272
-GOOGLE_ANALYTICS_ID = 'UA-XXXXX-Y'
273
-
274
-LOG_ROOT = location('logs')
275
-DISPLAY_VERSION = False
276
-
277
-THUMBNAIL_DEBUG = True
278
-
279
-# Must be within MEDIA_ROOT for sorl to work
280
-OSCAR_MISSING_IMAGE_URL = 'image_not_found.jpg'
281
-
282
-try:
283
-    from settings_local import *
284
-except ImportError:
285
-    pass

Loading…
Annulla
Salva