diff --git a/Changelog b/Changelog index fe9a1dde..8defa619 100644 --- a/Changelog +++ b/Changelog @@ -1,10 +1,15 @@ -Next: +1.2.4: 2017-10-02 + * #3780: [hosting] Store VM details locally * #3764: [hosting] Show cancelled VMs' invoices * #3736: [dcl] Refactor the place where we compute the VM price * #3730: [dcl] Refactor price parameter passed in the DCL flow * #3807: [dcl] Remove PricingView as it is no more used * #3813: [hosting] JS error in create ssh key page * #3756: [dcl] Update landing calculator and billing info page + * Bugfix: Fix PR 493 bug that creates a new StripeCustomer for each buying of VM with the same email id + * #3835: [all] Forbidden (403) CSRF verification failed issue. + * Bugfix: [hosting] Dashboard strictly available after login + * #3808: [dcl] Order confirmation page redesign 1.2.3: 2017-09-25 * #3484: [dcl, hosting] Refactored account activation, password reset, VM order and cancellation email * #3731: [dcl, hosting] Added cdist ssh key handler diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index 941550db..a797eeab 100644 --- a/datacenterlight/locale/de/LC_MESSAGES/django.po +++ b/datacenterlight/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-09-28 18:36+0530\n" +"POT-Creation-Date: 2017-10-03 18:54+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -374,24 +374,6 @@ msgstr "Weiter" msgid "Enter your credit card number" msgstr "Deine Kreditkartennummer" -msgid "Confirm Order" -msgstr "Bestellung Bestätigen" - -msgid "Date" -msgstr "Datum" - -msgid "Billed To:" -msgstr "Rechnungsadresse" - -msgid "Payment Method:" -msgstr "Bezahlmethode" - -msgid "ending in" -msgstr "endend in" - -msgid "Order summary" -msgstr "Bestellungsübersicht" - #, python-format msgid "" "By clicking \"Place order\" this plan will charge your credit card account " @@ -403,21 +385,6 @@ msgstr "" msgid "Place order" msgstr "Bestellen" -msgid "Processing..." -msgstr "Abarbeitung..." - -msgid "Hold tight, we are processing your request" -msgstr "Bitte warten - wir verbeiten Deine Anfrage gerade" - -msgid "OK" -msgstr "" - -msgid "Close" -msgstr "" - -msgid "Some problem encountered. Please try again later." -msgstr "Ein Problem ist aufgetreten. Bitte versuche es später noch einmal." - msgid "Thank you for order! Our team will contact you via email" msgstr "" "Vielen Dank für die Bestellung. Unser Team setzt sich sobald wie möglich mit " @@ -511,6 +478,9 @@ msgstr "Ungültige RAM-Grösse" msgid "Invalid storage size" msgstr "Ungültige Speicher-Grösse" +msgid "Confirm Order" +msgstr "Bestellung Bestätigen" + msgid "Error." msgstr "" @@ -518,6 +488,8 @@ msgid "" "There was a payment related error. On close of this popup, you will be " "redirected back to the payment page." msgstr "" +"Es ist ein Fehler bei der Zahlung betreten. Du wirst nach dem Schliessen vom " +"Popup zur Bezahlseite weitergeleitet." msgid "Thank you for the order." msgstr "Danke für Deine Bestellung." @@ -529,6 +501,30 @@ msgstr "" "Deine VM ist gleich bereit. Wir senden Dir eine Bestätigungsemail, sobald Du " "auf sie zugreifen kannst." +#~ msgid "Processing..." +#~ msgstr "Abarbeitung..." + +#~ msgid "Hold tight, we are processing your request" +#~ msgstr "Bitte warten - wir verbeiten Deine Anfrage gerade" + +#~ msgid "Some problem encountered. Please try again later." +#~ msgstr "Ein Problem ist aufgetreten. Bitte versuche es später noch einmal." + +#~ msgid "Date" +#~ msgstr "Datum" + +#~ msgid "Billed To:" +#~ msgstr "Rechnungsadresse" + +#~ msgid "Payment Method:" +#~ msgstr "Bezahlmethode" + +#~ msgid "ending in" +#~ msgstr "endend in" + +#~ msgid "Order summary" +#~ msgstr "Bestellungsübersicht" + #~ msgid "We are cutting down the costs significantly!" #~ msgstr "Wir sorgen dafür, dass die Kosten für Dich signifikant abnehmen" diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index d50a864d..0d0729fb 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -1501,6 +1501,8 @@ tech-sub-sec h2 { font-size: 14px; font-weight: 300; letter-spacing: 2px; + line-height: 24px; + display: block; } .content-section-a { diff --git a/datacenterlight/tasks.py b/datacenterlight/tasks.py index 80dd2c65..3db6eb54 100644 --- a/datacenterlight/tasks.py +++ b/datacenterlight/tasks.py @@ -51,15 +51,20 @@ def retry_task(task, exception=None): @app.task(bind=True, max_retries=settings.CELERY_MAX_RETRIES) def create_vm_task(self, vm_template_id, user, specs, template, stripe_customer_id, billing_address_data, - billing_address_id, - charge, cc_details): + stripe_subscription_id, cc_details): logger.debug( "Running create_vm_task on {}".format(current_task.request.hostname)) vm_id = None try: final_price = specs.get('price') - billing_address = BillingAddress.objects.filter( - id=billing_address_id).first() + billing_address = BillingAddress( + cardholder_name=billing_address_data['cardholder_name'], + street_address=billing_address_data['street_address'], + city=billing_address_data['city'], + postal_code=billing_address_data['postal_code'], + country=billing_address_data['country'] + ) + billing_address.save() customer = StripeCustomer.objects.filter(id=stripe_customer_id).first() if 'pass' in user: @@ -112,8 +117,7 @@ def create_vm_task(self, vm_template_id, user, specs, template, billing_address_user_form.save() # Associate an order with a stripe subscription - charge_object = DictDotLookup(charge) - order.set_subscription_id(charge_object, cc_details) + order.set_subscription_id(stripe_subscription_id, cc_details) # If the Stripe payment succeeds, set order status approved order.set_approved() @@ -185,7 +189,8 @@ def create_vm_task(self, vm_template_id, user, specs, template, public_keys] if len(keys) > 0: logger.debug( - "Calling configure on {host} for {num_keys} keys".format( + "Calling configure on {host} for " + "{num_keys} keys".format( host=new_host, num_keys=len(keys))) # Let's delay the task by 75 seconds to be sure # that we run the cdist configure after the host @@ -214,32 +219,3 @@ def create_vm_task(self, vm_template_id, user, specs, template, return return vm_id - - -class DictDotLookup(object): - """ - Creates objects that behave much like a dictionaries, but allow nested - key access using object '.' (dot) lookups. - """ - - def __init__(self, d): - for k in d: - if isinstance(d[k], dict): - self.__dict__[k] = DictDotLookup(d[k]) - elif isinstance(d[k], (list, tuple)): - l = [] - for v in d[k]: - if isinstance(v, dict): - l.append(DictDotLookup(v)) - else: - l.append(v) - self.__dict__[k] = l - else: - self.__dict__[k] = d[k] - - def __getitem__(self, name): - if name in self.__dict__: - return self.__dict__[name] - - def __iter__(self): - return iter(self.__dict__.keys()) diff --git a/datacenterlight/templates/datacenterlight/index.html b/datacenterlight/templates/datacenterlight/index.html index cde420dd..85e66571 100755 --- a/datacenterlight/templates/datacenterlight/index.html +++ b/datacenterlight/templates/datacenterlight/index.html @@ -16,7 +16,7 @@