Fixed ungleich urls, created model for storing VM types, created command to load VM prices and data to database
This commit is contained in:
parent
5397fd9a63
commit
7c891fe9c4
9 changed files with 155 additions and 2 deletions
27
hosting/migrations/0003_virtualmachinetypes.py
Normal file
27
hosting/migrations/0003_virtualmachinetypes.py
Normal 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)),
|
||||
],
|
||||
),
|
||||
]
|
||||
19
hosting/migrations/0004_auto_20160418_0034.py
Normal file
19
hosting/migrations/0004_auto_20160418_0034.py
Normal 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',
|
||||
),
|
||||
]
|
||||
20
hosting/migrations/0005_auto_20160418_0038.py
Normal file
20
hosting/migrations/0005_auto_20160418_0038.py
Normal 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',
|
||||
),
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue