diff --git a/accounts/migrations/0007_auto_20160426_0635.py b/accounts/migrations/0007_auto_20160426_0635.py new file mode 100644 index 0000000..2f92aba --- /dev/null +++ b/accounts/migrations/0007_auto_20160426_0635.py @@ -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), + ), + ] diff --git a/accounts/models.py b/accounts/models.py index 5e829f0..d55bd95 100644 --- a/accounts/models.py +++ b/accounts/models.py @@ -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