Site inactif
++ + Raison : {{message}} +
diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..fcfd6d7 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +## v3.0.1 +* Fix page inactive +* Fix prix dans les historiques de consommations \ No newline at end of file diff --git a/coopeV3/acl.py b/coopeV3/acl.py index f971e38..9539565 100644 --- a/coopeV3/acl.py +++ b/coopeV3/acl.py @@ -35,7 +35,7 @@ def active_required(view): def wrapper(request, *args, **kwargs): gp,_ = GeneralPreferences.objects.get_or_create(pk=1) if(not gp.is_active): - return redirect(reverse('preferences:inactif')) + return redirect(reverse('preferences:inactive')) return view(request, *args, **kwargs) return wrapper diff --git a/gestion/views.py b/gestion/views.py index c2677f7..b0832d7 100644 --- a/gestion/views.py +++ b/gestion/views.py @@ -158,7 +158,7 @@ def order(request): consumption, _ = Consumption.objects.get_or_create(customer=user, product=product) consumption.quantity += quantity consumption.save() - ch = ConsumptionHistory(customer = user, quantity = quantity, paymentMethod=paymentMethod, product=product, amount=int(quantity*product.amount), coopeman=request.user) + ch = ConsumptionHistory(customer=user, quantity=quantity, paymentMethod=paymentMethod, product=product, amount=Decimal(quantity*product.amount), coopeman=request.user) ch.save() for m in menus: menu = get_object_or_404(Menu, pk=m["pk"]) diff --git a/preferences/templates/preferences/inactive.html b/preferences/templates/preferences/inactive.html new file mode 100644 index 0000000..4855067 --- /dev/null +++ b/preferences/templates/preferences/inactive.html @@ -0,0 +1,19 @@ +{% extends 'base.html' %} +{% block entete %}Site inactif{% endblock %} +{% block navbar %} +
coope.rez v3.0 (release stable) © 2018 Yoann Pietri.
+coope.rez v3.0.1 (release stable) © 2018 Yoann Pietri.