Fixes
This commit is contained in:
parent
e2dbe4cec6
commit
46bc3ff0ff
@ -195,13 +195,15 @@ if DEBUG:
|
||||
'version': 1,
|
||||
'disable_existing_loggers': False,
|
||||
'formatters': {
|
||||
'standard': {
|
||||
'format': '%(asctime)s %(levelname)s %(name)s %(message)s'
|
||||
},
|
||||
'verbose': {
|
||||
'format': '{name} {levelname} {asctime} {module} {process:d} {thread:d} {message}',
|
||||
'style': '{',
|
||||
}
|
||||
},
|
||||
'handlers': {
|
||||
'console': {
|
||||
'class': 'logging.StreamHandler',
|
||||
'formatter': 'verbose',
|
||||
},
|
||||
},
|
||||
'root': {
|
||||
@ -214,15 +216,21 @@ else:
|
||||
'version': 1,
|
||||
'disable_existing_loggers': False,
|
||||
'formatters': {
|
||||
'standard': {
|
||||
'format': '%(asctime)s %(levelname)s %(name)s %(message)s'
|
||||
'verbose': {
|
||||
'format': '{name} {levelname} {asctime} {module} {process:d} {thread:d} {message}',
|
||||
'style': '{',
|
||||
},
|
||||
'simple': {
|
||||
'format': '{levelname} {message}',
|
||||
'style': '{',
|
||||
}
|
||||
},
|
||||
'handlers': {
|
||||
'file': {
|
||||
'level': 'DEBUG',
|
||||
'class': 'logging.FileHandler',
|
||||
'filename': '/var/log/django-ptcoffee/debug.log',
|
||||
'formatter': 'verbose',
|
||||
},
|
||||
},
|
||||
'loggers': {
|
||||
|
||||
@ -804,6 +804,13 @@ article + article {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Orders & OrderLines
|
||||
========================================================================== */
|
||||
.line__image {
|
||||
max-width: 8rem;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -123,11 +123,10 @@ class Cart:
|
||||
usps = USPSApiWithRate(settings.USPS_USER_ID, test=True)
|
||||
validation = usps.get_rate(usps_rate_request)
|
||||
logger.info(validation.result)
|
||||
try:
|
||||
if not 'Error' in validation.result['RateV4Response']['Package']:
|
||||
rate = validation.result['RateV4Response']['Package']['Postage']['CommercialRate']
|
||||
rate = '0.00'
|
||||
except KeyError as e:
|
||||
raise e("USPS Result has no 'Postage'")
|
||||
else:
|
||||
logger.error("USPS Rate error")
|
||||
rate = '0.00'
|
||||
return Decimal(rate)
|
||||
else:
|
||||
|
||||
@ -23,9 +23,12 @@
|
||||
<tr>
|
||||
{% with product=item.product %}
|
||||
<td>
|
||||
<img src="{{product.get_first_img.image.url}}" alt="{{product.get_first_img.image}}">
|
||||
<img class="line__image" src="{{product.get_first_img.image.url}}" alt="{{product.get_first_img.image}}">
|
||||
</td>
|
||||
<td>
|
||||
<strong>{{product.name}}</strong><br>
|
||||
{{item.customer_note}}
|
||||
</td>
|
||||
<td><strong>{{product.name}}</strong></td>
|
||||
<td>{{item.quantity}}</td>
|
||||
<td>${{product.price}}</td>
|
||||
<td>${{item.get_total}}</td>
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block head_title %}Shop | {% endblock %}
|
||||
|
||||
{% block head %}
|
||||
<script defer src="{% static 'scripts/product_list.js' %}"></script>
|
||||
{% endblock %}
|
||||
@ -10,7 +8,6 @@
|
||||
{% block content %}
|
||||
<div class="site__banner site__banner--site">
|
||||
<h1>Organic Coffee, Slow Roasted, Italian Style</h1>
|
||||
<p><em>BETTER</em>, Not <em>BITTER</em></p>
|
||||
</div>
|
||||
<article>
|
||||
<section class="product__list">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user