Fixed ungleich urls, created model for storing VM types, created command to load VM prices and data to database

This commit is contained in:
Levi 2016-04-17 19:52:19 -05:00
commit 05e73b1d5e
9 changed files with 155 additions and 2 deletions

View file

@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-04-18 00:32
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hosting', '0002_railsbetauser'),
]
operations = [
migrations.CreateModel(
name='VirtualMachineTypes',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('description', models.TextField()),
('base_price', models.FloatField()),
('memory_price', models.FloatField()),
('cores_price', models.FloatField()),
('disk_size_price', models.FloatField()),
('hosting_company', models.CharField(choices=[('hetzner_nug', 'Hetzner No Uptime Guarantee'), ('hetzner', 'Hetzner'), ('hetzner_raid6', 'Hetzner Raid6'), ('hetzner_glusterfs', 'Hetzner Glusterfs'), ('bern', 'Bern')], max_length=10)),
],
),
]

View file

@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-04-18 00:34
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('hosting', '0003_virtualmachinetypes'),
]
operations = [
migrations.RenameModel(
old_name='VirtualMachineTypes',
new_name='VirtualMachineType',
),
]

View file

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-04-18 00:38
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('hosting', '0004_auto_20160418_0034'),
]
operations = [
migrations.RenameField(
model_name='virtualmachinetype',
old_name='cores_price',
new_name='core_price',
),
]