From: Guillaume Pellerin Date: Tue, 29 Sep 2015 23:24:52 +0000 (+0200) Subject: bugfix X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=03354897ebcab6c9ff116f57985a13405dc0cf5e;p=diggersdigest.git bugfix --- diff --git a/app/records/static/css/dig2.css b/app/records/static/css/dig2.css index 85f124c..90720b1 100644 --- a/app/records/static/css/dig2.css +++ b/app/records/static/css/dig2.css @@ -17,7 +17,7 @@ body { padding-top: 172px; background-color: white; font-family: 'Gill Sans', sans-serif; - font-size: 130%; + font-size: 140%; } h1 { diff --git a/app/records/utils.py b/app/records/utils.py index c440396..e6ba0d6 100644 --- a/app/records/utils.py +++ b/app/records/utils.py @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- from django import forms +from django.utils.translation import ugettext_lazy as _ from cartridge.shop import checkout from cartridge.shop.utils import set_shipping @@ -14,7 +15,7 @@ COUNTRY_CHOICES = tuple((k,v) for k,v in COUNTRIES.items()) from operator import itemgetter COUNTRY_CHOICES = tuple(sorted(COUNTRY_CHOICES, key=itemgetter(1))) - + from payments.multipayments.forms.base import CallbackUUIDOrderForm # See https://github.com/SmileyChris/django-countries/blob/master/django_countries/data.py#L46 @@ -69,7 +70,7 @@ def custom_billship_handler(request, order_form): shipping_type = "shipping rate" shipping_total = 15 - + if order_form is not None: shipping_detail_country = order_form.cleaned_data['shipping_detail_country'] if shipping_detail_country == 'FR': @@ -79,7 +80,7 @@ def custom_billship_handler(request, order_form): else: shipping_type = _("Colissimo recommande shipping") shipping_total = 10 - + elif shipping_detail_country in EURO_ZONE: if (request.cart.total_price() <= 50) & (request.cart.total_quantity()< 6): shipping_type = _("SIMPLE REGISTERED PRIORITY PARCEL shipping") @@ -103,7 +104,7 @@ def custom_billship_handler(request, order_form): shipping_total = 25 - + if not request.session.get("free_shipping"): settings.use_editable() print shipping_type, shipping_total @@ -114,7 +115,7 @@ SHIPPING_CHOICES = ( (0,"SIMPLE REGISTERED PRIORITY PARCEL"), (1,"INTERNATIONAL COLISSIMO (INSURED)"), (2,"COLISSIMO (France only)"), (3,"COLISSIMO RECOMMANDE (France only)"), - ) + ) @@ -133,14 +134,14 @@ class CustomOrderForm(CallbackUUIDOrderForm): self.fields['billing_detail_country'].widget = billing_country self.fields['shipping_detail_country'].widget = shipping_country - - + + ## if step == checkout.CHECKOUT_STEP_PAYMENT: ## print "Payment step" ## if self.is_valid(): ## data = self.cleaned_data ## if data["shipping_detail_country"] == 'France': - ## print ' ----- FRANCE ----' + ## print ' ----- FRANCE ----' ## choices = SHIPPING_CHOICES[2:3] ## self.fields["shipping_method"].choices = choices ## else: @@ -148,10 +149,10 @@ class CustomOrderForm(CallbackUUIDOrderForm): ## print self.fields["shipping_detail_country"] ## else: ## print "Pas VALIDE" - + ## class Meta(CallbackUUIDOrderForm.Meta): - ## + ## ## fields = CallbackUUIDOrderForm.Meta.fields + ["shipping_method"] ## print fields