From 8993a7bde1a13f37648787c2488e5218331b6307 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sun, 1 Jul 2018 11:05:23 +0200 Subject: [PATCH] Reorganize imports + format code --- datacenterlight/tasks.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/datacenterlight/tasks.py b/datacenterlight/tasks.py index 07d132e2..4d0fa070 100644 --- a/datacenterlight/tasks.py +++ b/datacenterlight/tasks.py @@ -1,8 +1,8 @@ from datetime import datetime +from celery import current_task from celery.exceptions import MaxRetriesExceededError from celery.utils.log import get_task_logger -from celery import current_task from django.conf import settings from django.core.mail import EmailMessage from django.core.urlresolvers import reverse @@ -14,11 +14,10 @@ from hosting.models import HostingOrder, HostingBill from membership.models import StripeCustomer, CustomUser from opennebula_api.models import OpenNebulaManager from opennebula_api.serializers import VirtualMachineSerializer -from utils.hosting_utils import get_all_public_keys, get_or_create_vm_detail from utils.forms import UserBillingAddressForm +from utils.hosting_utils import get_all_public_keys, get_or_create_vm_detail from utils.mailer import BaseEmail from utils.models import BillingAddress - from .models import VMPricing logger = get_task_logger(__name__) @@ -173,8 +172,8 @@ def create_vm_task(self, vm_template_id, user, specs, template, 'order_url': reverse('hosting:orders', kwargs={'pk': order.id}), 'page_header': _( - 'Your New VM %(vm_name)s at Data Center Light') % { - 'vm_name': vm.get('name')}, + 'Your New VM %(vm_name)s at Data Center Light') % + {'vm_name': vm.get('name')}, 'vm_name': vm.get('name') } email_data = {