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 cc72f397..6a00b341 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-23 21:22+0000\n" +"POT-Creation-Date: 2017-10-01 22:13+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -388,24 +388,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 " @@ -417,36 +399,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 "Some problem encountered. Please try again later." -msgstr "Ein Problem ist aufgetreten. Bitte versuche es später noch einmal." - -msgid "We are cutting down the costs significantly!" -msgstr "Wir sorgen dafür, dass die Kosten für Dich signifikant abnehmen" - -msgid "Order Now!" -msgstr "Bestelle jetzt!" - -msgid "" -"Our VMs are hosted in Glarus, Switzerland, and our website is currently " -"running in BETA mode. If you want more information that you did not find on " -"our website, or if your order is more detailed, or if you encounter any " -"technical hiccups, please contact us at support@datacenterlight.ch, our team " -"will get in touch with you asap." -msgstr "" -"Unsere VMs werden in der Schweiz im Kanton Glarus gehostet und befinden sich " -"zur Zeit noch in der BETA-Phase. Möchtest du mehr über uns erfahren und hast " -"auf unserer Website nicht genügend Informationen gefunden? Möchtest eine " -"detailliertere Bestellung aufgeben? Bist du auf technische Probleme " -"gestossen, die du uns mitteilen möchtest? Dann zögere nicht und kontaktiere " -"uns unter support@datacenterlight.ch. Unser Team wird sich umgehend um dein " -"Anliegen kümmern!" - 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 " @@ -540,6 +492,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 "" @@ -547,6 +502,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." @@ -558,6 +515,51 @@ msgstr "" "Deine VM ist gleich bereit. Wir senden Dir eine Bestätigungsemail, sobald Du " "auf sie zugreifen kannst." +#~ 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 "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 "We are cutting down the costs significantly!" +#~ msgstr "Wir sorgen dafür, dass die Kosten für Dich signifikant abnehmen" + +#~ msgid "Order Now!" +#~ msgstr "Bestelle jetzt!" + +#~ msgid "" +#~ "Our VMs are hosted in Glarus, Switzerland, and our website is currently " +#~ "running in BETA mode. If you want more information that you did not find " +#~ "on our website, or if your order is more detailed, or if you encounter " +#~ "any technical hiccups, please contact us at support@datacenterlight.ch, " +#~ "our team will get in touch with you asap." +#~ msgstr "" +#~ "Unsere VMs werden in der Schweiz im Kanton Glarus gehostet und befinden " +#~ "sich zur Zeit noch in der BETA-Phase. Möchtest du mehr über uns erfahren " +#~ "und hast auf unserer Website nicht genügend Informationen gefunden? " +#~ "Möchtest eine detailliertere Bestellung aufgeben? Bist du auf technische " +#~ "Probleme gestossen, die du uns mitteilen möchtest? Dann zögere nicht und " +#~ "kontaktiere uns unter support@datacenterlight.ch. Unser Team wird sich " +#~ "umgehend um dein Anliegen kümmern!" + #~ msgid "Email Address" #~ msgstr "E-Mail-Adresse" 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 7d589570..1f34c3fe 100644 --- a/datacenterlight/tasks.py +++ b/datacenterlight/tasks.py @@ -50,15 +50,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: @@ -111,8 +116,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() @@ -183,7 +187,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 @@ -212,32 +217,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 @@