Added DjangoHostingView test, Added RailsHostingView test, Added, NodeJSHostingView test, Changed VMPlan model, Fixed templates to support new relationship between orders and VMplans, Merged Calendar feature with Booking

This commit is contained in:
Levi 2016-05-05 01:03:35 -05:00
commit 342512036d
9 changed files with 106 additions and 15 deletions

View file

@ -95,10 +95,6 @@ class VirtualMachinePlan(models.Model):
name = 'vm-%s' % self.id
return name
@cached_property
def orders(self):
return [self.hostingorder]
@classmethod
def create(cls, data, user):
instance = cls.objects.create(**data)
@ -110,7 +106,7 @@ class HostingOrder(models.Model):
ORDER_APPROVED_STATUS = 'Approved'
ORDER_DECLINED_STATUS = 'Declined'
VMPlan = models.ForeignKey(VirtualMachinePlan)
VMPlan = models.ForeignKey(VirtualMachinePlan, related_name='hosting_orders')
customer = models.ForeignKey(StripeCustomer)
billing_address = models.ForeignKey(BillingAddress)
created_at = models.DateTimeField(auto_now_add=True)