mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 15:15:22 +00:00
set default UserAttributes to instances=1, vcpus=1, memory=2048, disk=20
This commit is contained in:
parent
db1ab88f51
commit
25529835b5
2 changed files with 38 additions and 4 deletions
34
accounts/migrations/0007_auto_20160426_0635.py
Normal file
34
accounts/migrations/0007_auto_20160426_0635.py
Normal file
|
@ -0,0 +1,34 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('accounts', '0006_userattributes_max_disk_size'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='userattributes',
|
||||
name='max_cpus',
|
||||
field=models.IntegerField(default=1),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='userattributes',
|
||||
name='max_disk_size',
|
||||
field=models.IntegerField(default=20),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='userattributes',
|
||||
name='max_instances',
|
||||
field=models.IntegerField(default=1),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='userattributes',
|
||||
name='max_memory',
|
||||
field=models.IntegerField(default=2048),
|
||||
),
|
||||
]
|
|
@ -24,10 +24,10 @@ class UserSSHKey(models.Model):
|
|||
class UserAttributes(models.Model):
|
||||
user = models.OneToOneField(User, on_delete=models.CASCADE)
|
||||
can_clone_instances = models.BooleanField(default=False)
|
||||
max_instances = models.IntegerField(default=0)
|
||||
max_cpus = models.IntegerField(default=0)
|
||||
max_memory = models.IntegerField(default=0)
|
||||
max_disk_size = models.IntegerField(default=0)
|
||||
max_instances = models.IntegerField(default=1)
|
||||
max_cpus = models.IntegerField(default=1)
|
||||
max_memory = models.IntegerField(default=2048)
|
||||
max_disk_size = models.IntegerField(default=20)
|
||||
|
||||
def __unicode__(self):
|
||||
return self.user.username
|
||||
|
|
Loading…
Reference in a new issue