Changed hostingorder to m2m with vm plan model

This commit is contained in:
Levi 2016-05-04 22:06:49 -05:00
parent 1486843af0
commit 6e8004bfd0
3 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-05-05 03:02
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('hosting', '0012_auto_20160501_1850'),
]
operations = [
migrations.AlterField(
model_name='hostingorder',
name='VMPlan',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hosting.VirtualMachinePlan'),
),
]

View File

@ -110,7 +110,7 @@ class HostingOrder(models.Model):
ORDER_APPROVED_STATUS = 'Approved'
ORDER_DECLINED_STATUS = 'Declined'
VMPlan = models.OneToOneField(VirtualMachinePlan)
VMPlan = models.ForeignKey(VirtualMachinePlan)
customer = models.ForeignKey(StripeCustomer)
billing_address = models.ForeignKey(BillingAddress)
created_at = models.DateTimeField(auto_now_add=True)

0
hosting/test_views.py Normal file
View File