diff --git a/orchestra/contrib/accounts/migrations/0001_initial.py b/orchestra/contrib/accounts/migrations/0001_initial.py index 7f4fc11b..b298cec2 100644 --- a/orchestra/contrib/accounts/migrations/0001_initial.py +++ b/orchestra/contrib/accounts/migrations/0001_initial.py @@ -2,35 +2,35 @@ from __future__ import unicode_literals from django.db import models, migrations +import django.contrib.auth.models import django.core.validators import django.utils.timezone -import django.contrib.auth.models class Migration(migrations.Migration): # dependencies = [ -# ('systemusers', '__first__'), +# ('systemusers', '0001_initial'), # ] operations = [ migrations.CreateModel( name='Account', fields=[ - ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), + ('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)), ('password', models.CharField(max_length=128, verbose_name='password')), - ('last_login', models.DateTimeField(verbose_name='last login', blank=True, null=True)), - ('username', models.CharField(validators=[django.core.validators.RegexValidator('^[\\w.-]+$', 'Enter a valid username.', 'invalid')], help_text='Required. 64 characters or fewer. Letters, digits and ./-/_ only.', unique=True, max_length=32, verbose_name='username')), - ('short_name', models.CharField(blank=True, max_length=64, verbose_name='short name')), + ('last_login', models.DateTimeField(verbose_name='last login', null=True, blank=True)), + ('username', models.CharField(max_length=32, verbose_name='username', help_text='Required. 64 characters or fewer. Letters, digits and ./-/_ only.', unique=True, validators=[django.core.validators.RegexValidator('^[\\w.-]+$', 'Enter a valid username.', 'invalid')])), + ('short_name', models.CharField(max_length=64, verbose_name='short name', blank=True)), ('full_name', models.CharField(max_length=256, verbose_name='full name')), - ('email', models.EmailField(help_text='Used for password recovery', verbose_name='email address', max_length=254)), - ('type', models.CharField(choices=[('INDIVIDUAL', 'Individual'), ('ASSOCIATION', 'Association'), ('CUSTOMER', 'Customer'), ('STAFF', 'Staff'), ('FRIEND', 'Friend')], default='INDIVIDUAL', max_length=32, verbose_name='type')), - ('language', models.CharField(choices=[('CA', 'Catalan'), ('ES', 'Spanish'), ('EN', 'English')], default='CA', max_length=2, verbose_name='language')), - ('comments', models.TextField(blank=True, max_length=256, verbose_name='comments')), - ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), - ('is_active', models.BooleanField(default=True, help_text='Designates whether this account should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), - ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), - ('main_systemuser', models.ForeignKey(related_name='accounts_main', null=True, editable=False, to='systemusers.SystemUser')), + ('email', models.EmailField(max_length=254, verbose_name='email address', help_text='Used for password recovery')), + ('type', models.CharField(max_length=32, verbose_name='type', choices=[('INDIVIDUAL', 'Individual'), ('ASSOCIATION', 'Association'), ('CUSTOMER', 'Customer'), ('STAFF', 'Staff'), ('FRIEND', 'Friend')], default='INDIVIDUAL')), + ('language', models.CharField(max_length=2, verbose_name='language', choices=[('CA', 'Catalan'), ('ES', 'Spanish'), ('EN', 'English')], default='CA')), + ('comments', models.TextField(max_length=256, verbose_name='comments', blank=True)), + ('is_superuser', models.BooleanField(verbose_name='superuser status', help_text='Designates that this user has all permissions without explicitly assigning them.', default=False)), + ('is_active', models.BooleanField(verbose_name='active', help_text='Designates whether this account should be treated as active. Unselect this instead of deleting accounts.', default=True)), + ('date_joined', models.DateTimeField(verbose_name='date joined', default=django.utils.timezone.now)), +# ('main_systemuser', models.ForeignKey(null=True, editable=False, related_name='accounts_main', to='systemusers.SystemUser')), ], options={ 'abstract': False, diff --git a/orchestra/contrib/accounts/migrations/0002_auto_20150429_1351.py b/orchestra/contrib/accounts/migrations/0002_auto_20150429_1351.py new file mode 100644 index 00000000..35bef4c0 --- /dev/null +++ b/orchestra/contrib/accounts/migrations/0002_auto_20150429_1351.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import django.contrib.auth.models +import django.core.validators +import django.utils.timezone + +class Migration(migrations.Migration): + + dependencies = [ + ('accounts', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='Account', + fields=[ + ('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)), + ('password', models.CharField(max_length=128, verbose_name='password')), + ('last_login', models.DateTimeField(verbose_name='last login', null=True, blank=True)), + ('username', models.CharField(max_length=32, verbose_name='username', help_text='Required. 64 characters or fewer. Letters, digits and ./-/_ only.', unique=True, validators=[django.core.validators.RegexValidator('^[\\w.-]+$', 'Enter a valid username.', 'invalid')])), + ('short_name', models.CharField(max_length=64, verbose_name='short name', blank=True)), + ('full_name', models.CharField(max_length=256, verbose_name='full name')), + ('email', models.EmailField(max_length=254, verbose_name='email address', help_text='Used for password recovery')), + ('type', models.CharField(max_length=32, verbose_name='type', choices=[('INDIVIDUAL', 'Individual'), ('ASSOCIATION', 'Association'), ('CUSTOMER', 'Customer'), ('STAFF', 'Staff'), ('FRIEND', 'Friend')], default='INDIVIDUAL')), + ('language', models.CharField(max_length=2, verbose_name='language', choices=[('CA', 'Catalan'), ('ES', 'Spanish'), ('EN', 'English')], default='CA')), + ('comments', models.TextField(max_length=256, verbose_name='comments', blank=True)), + ('is_superuser', models.BooleanField(verbose_name='superuser status', help_text='Designates that this user has all permissions without explicitly assigning them.', default=False)), + ('is_active', models.BooleanField(verbose_name='active', help_text='Designates whether this account should be treated as active. Unselect this instead of deleting accounts.', default=True)), + ('date_joined', models.DateTimeField(verbose_name='date joined', default=django.utils.timezone.now)), + ('main_systemuser', models.ForeignKey(null=True, editable=False, related_name='accounts_main', to='systemusers.SystemUser')), + ], + options={ + 'abstract': False, + }, + managers=[ + ('objects', django.contrib.auth.models.UserManager()), + ], + ), + ] diff --git a/orchestra/contrib/bills/migrations/0001_initial.py b/orchestra/contrib/bills/migrations/0001_initial.py index 3f4d33bc..8ca7a6fd 100644 --- a/orchestra/contrib/bills/migrations/0001_initial.py +++ b/orchestra/contrib/bills/migrations/0001_initial.py @@ -3,34 +3,34 @@ from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings -import django.db.models.deletion import django.core.validators +import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ + ('orders', '__first__'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('orders', '0001_initial'), ] operations = [ migrations.CreateModel( name='Bill', fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), - ('number', models.CharField(verbose_name='number', blank=True, unique=True, max_length=16)), + ('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), + ('number', models.CharField(max_length=16, verbose_name='number', blank=True, unique=True)), ('type', models.CharField(verbose_name='type', choices=[('INVOICE', 'Invoice'), ('AMENDMENTINVOICE', 'Amendment invoice'), ('FEE', 'Fee'), ('AMENDMENTFEE', 'Amendment Fee'), ('PROFORMA', 'Pro forma')], max_length=16)), - ('created_on', models.DateField(verbose_name='created on', auto_now_add=True)), - ('closed_on', models.DateField(verbose_name='closed on', null=True, blank=True)), + ('created_on', models.DateField(auto_now_add=True, verbose_name='created on')), + ('closed_on', models.DateField(null=True, verbose_name='closed on', blank=True)), ('is_open', models.BooleanField(verbose_name='open', default=True)), ('is_sent', models.BooleanField(verbose_name='sent', default=False)), - ('due_on', models.DateField(verbose_name='due on', null=True, blank=True)), + ('due_on', models.DateField(null=True, verbose_name='due on', blank=True)), ('updated_on', models.DateField(verbose_name='updated on', auto_now=True)), - ('total', models.DecimalField(default=0, decimal_places=2, max_digits=12)), + ('total', models.DecimalField(decimal_places=2, default=0, max_digits=12)), ('comments', models.TextField(verbose_name='comments', blank=True)), ('html', models.TextField(verbose_name='HTML', blank=True)), - ('account', models.ForeignKey(verbose_name='account', related_name='bill', to=settings.AUTH_USER_MODEL)), + ('account', models.ForeignKey(related_name='bill', to=settings.AUTH_USER_MODEL, verbose_name='account')), ], options={ 'get_latest_by': 'id', @@ -39,42 +39,44 @@ class Migration(migrations.Migration): migrations.CreateModel( name='BillContact', fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), - ('name', models.CharField(verbose_name='name', blank=True, help_text='Account full name will be used when left blank.', max_length=256)), + ('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), + ('name', models.CharField(verbose_name='name', help_text='Account full name will be used when left blank.', blank=True, max_length=256)), ('address', models.TextField(verbose_name='address')), ('city', models.CharField(verbose_name='city', default='Barcelona', max_length=128)), - ('zipcode', models.CharField(verbose_name='zip code', validators=[django.core.validators.RegexValidator('^[0-9A-Z]{3,10}$', 'Enter a valid zipcode.')], max_length=10)), - ('country', models.CharField(verbose_name='country', default='ES', choices=[('TR', 'Turkey'), ('BV', 'Bouvet Island'), ('EE', 'Estonia'), ('CO', 'Colombia'), ('MW', 'Malawi'), ('JM', 'Jamaica'), ('GF', 'French Guiana'), ('NR', 'Nauru'), ('DK', 'Denmark'), ('SY', 'Syrian Arab Republic'), ('PH', 'Philippines'), ('TF', 'French Southern Territories'), ('GH', 'Ghana'), ('AM', 'Armenia'), ('PY', 'Paraguay'), ('VE', 'Venezuela (Bolivarian Republic of)'), ('EG', 'Egypt'), ('CU', 'Cuba'), ('VI', 'Virgin Islands (U.S.)'), ('KN', 'Saint Kitts and Nevis'), ('RU', 'Russian Federation'), ('RO', 'Romania'), ('MD', 'Moldova (the Republic of)'), ('GB', 'United Kingdom of Great Britain and Northern Ireland'), ('JP', 'Japan'), ('OM', 'Oman'), ('AE', 'United Arab Emirates'), ('BM', 'Bermuda'), ('VG', 'Virgin Islands (British)'), ('CD', 'Congo (the Democratic Republic of the)'), ('GY', 'Guyana'), ('IQ', 'Iraq'), ('DJ', 'Djibouti'), ('MU', 'Mauritius'), ('UG', 'Uganda'), ('ID', 'Indonesia'), ('KP', "Korea (the Democratic People's Republic of)"), ('CA', 'Canada'), ('MS', 'Montserrat'), ('SA', 'Saudi Arabia'), ('SZ', 'Swaziland'), ('NZ', 'New Zealand'), ('TO', 'Tonga'), ('IM', 'Isle of Man'), ('AZ', 'Azerbaijan'), ('PG', 'Papua New Guinea'), ('LB', 'Lebanon'), ('PR', 'Puerto Rico'), ('HM', 'Heard Island and McDonald Islands'), ('GR', 'Greece'), ('CR', 'Costa Rica'), ('PA', 'Panama'), ('BG', 'Bulgaria'), ('SS', 'South Sudan'), ('PE', 'Peru'), ('BY', 'Belarus'), ('FK', 'Falkland Islands [Malvinas]'), ('PF', 'French Polynesia'), ('MP', 'Northern Mariana Islands'), ('HN', 'Honduras'), ('SI', 'Slovenia'), ('GU', 'Guam'), ('PL', 'Poland'), ('CW', 'Curaçao'), ('BF', 'Burkina Faso'), ('PT', 'Portugal'), ('ZM', 'Zambia'), ('TZ', 'Tanzania, United Republic of'), ('WF', 'Wallis and Futuna'), ('DM', 'Dominica'), ('GT', 'Guatemala'), ('PS', 'Palestine, State of'), ('TN', 'Tunisia'), ('BE', 'Belgium'), ('SX', 'Sint Maarten (Dutch part)'), ('FJ', 'Fiji'), ('FO', 'Faroe Islands'), ('BH', 'Bahrain'), ('BL', 'Saint Barthélemy'), ('DE', 'Germany'), ('NU', 'Niue'), ('SV', 'El Salvador'), ('BS', 'Bahamas'), ('MK', 'Macedonia (the former Yugoslav Republic of)'), ('SL', 'Sierra Leone'), ('SN', 'Senegal'), ('EH', 'Western Sahara'), ('TD', 'Chad'), ('NA', 'Namibia'), ('FI', 'Finland'), ('GW', 'Guinea-Bissau'), ('MT', 'Malta'), ('KY', 'Cayman Islands'), ('UM', 'United States Minor Outlying Islands'), ('LC', 'Saint Lucia'), ('GD', 'Grenada'), ('GM', 'Gambia'), ('HU', 'Hungary'), ('DZ', 'Algeria'), ('JO', 'Jordan'), ('ZW', 'Zimbabwe'), ('CY', 'Cyprus'), ('GL', 'Greenland'), ('UY', 'Uruguay'), ('MA', 'Morocco'), ('GP', 'Guadeloupe'), ('MY', 'Malaysia'), ('FR', 'France'), ('RE', 'Réunion'), ('MV', 'Maldives'), ('MN', 'Mongolia'), ('MO', 'Macao'), ('AU', 'Australia'), ('CX', 'Christmas Island'), ('VN', 'Viet Nam'), ('AS', 'American Samoa'), ('TK', 'Tokelau'), ('GS', 'South Georgia and the South Sandwich Islands'), ('KG', 'Kyrgyzstan'), ('AO', 'Angola'), ('TV', 'Tuvalu'), ('NI', 'Nicaragua'), ('QA', 'Qatar'), ('LT', 'Lithuania'), ('VA', 'Holy See'), ('PK', 'Pakistan'), ('GQ', 'Equatorial Guinea'), ('RS', 'Serbia'), ('KR', 'Korea (the Republic of)'), ('ER', 'Eritrea'), ('KW', 'Kuwait'), ('IR', 'Iran (Islamic Republic of)'), ('SK', 'Slovakia'), ('SE', 'Sweden'), ('TL', 'Timor-Leste'), ('AG', 'Antigua and Barbuda'), ('SD', 'Sudan'), ('BR', 'Brazil'), ('TM', 'Turkmenistan'), ('AI', 'Anguilla'), ('SR', 'Suriname'), ('MX', 'Mexico'), ('GE', 'Georgia'), ('KE', 'Kenya'), ('SH', 'Saint Helena, Ascension and Tristan da Cunha'), ('VC', 'Saint Vincent and the Grenadines'), ('MF', 'Saint Martin (French part)'), ('CC', 'Cocos (Keeling) Islands'), ('GI', 'Gibraltar'), ('ME', 'Montenegro'), ('MC', 'Monaco'), ('ZA', 'South Africa'), ('IS', 'Iceland'), ('KM', 'Comoros'), ('KI', 'Kiribati'), ('HT', 'Haiti'), ('BO', 'Bolivia (Plurinational State of)'), ('CH', 'Switzerland'), ('MR', 'Mauritania'), ('GA', 'Gabon'), ('KZ', 'Kazakhstan'), ('BN', 'Brunei Darussalam'), ('YT', 'Mayotte'), ('IL', 'Israel'), ('YE', 'Yemen'), ('SO', 'Somalia'), ('TJ', 'Tajikistan'), ('CZ', 'Czech Republic'), ('SC', 'Seychelles'), ('RW', 'Rwanda'), ('SG', 'Singapore'), ('SB', 'Solomon Islands'), ('AX', 'Åland Islands'), ('PN', 'Pitcairn'), ('NF', 'Norfolk Island'), ('AR', 'Argentina'), ('BD', 'Bangladesh'), ('GN', 'Guinea'), ('AF', 'Afghanistan'), ('VU', 'Vanuatu'), ('NL', 'Netherlands'), ('LA', "Lao People's Democratic Republic"), ('BW', 'Botswana'), ('BA', 'Bosnia and Herzegovina'), ('ST', 'Sao Tome and Principe'), ('GG', 'Guernsey'), ('BJ', 'Benin'), ('IT', 'Italy'), ('EC', 'Ecuador'), ('LY', 'Libya'), ('FM', 'Micronesia (Federated States of)'), ('AW', 'Aruba'), ('MG', 'Madagascar'), ('UZ', 'Uzbekistan'), ('AD', 'Andorra'), ('HK', 'Hong Kong'), ('PW', 'Palau'), ('PM', 'Saint Pierre and Miquelon'), ('AT', 'Austria'), ('LK', 'Sri Lanka'), ('LR', 'Liberia'), ('ET', 'Ethiopia'), ('US', 'United States of America'), ('CV', 'Cabo Verde'), ('SJ', 'Svalbard and Jan Mayen'), ('IO', 'British Indian Ocean Territory'), ('BB', 'Barbados'), ('CK', 'Cook Islands'), ('NC', 'New Caledonia'), ('BI', 'Burundi'), ('TT', 'Trinidad and Tobago'), ('CG', 'Congo'), ('CM', 'Cameroon'), ('KH', 'Cambodia'), ('TG', 'Togo'), ('CL', 'Chile'), ('CF', 'Central African Republic'), ('IN', 'India'), ('NP', 'Nepal'), ('TC', 'Turks and Caicos Islands'), ('MM', 'Myanmar'), ('MQ', 'Martinique'), ('LI', 'Liechtenstein'), ('JE', 'Jersey'), ('SM', 'San Marino'), ('MZ', 'Mozambique'), ('UA', 'Ukraine'), ('LV', 'Latvia'), ('MH', 'Marshall Islands'), ('AL', 'Albania'), ('TW', 'Taiwan (Province of China)'), ('DO', 'Dominican Republic'), ('ES', 'Spain'), ('IE', 'Ireland'), ('WS', 'Samoa'), ('HR', 'Croatia'), ('AQ', 'Antarctica'), ('ML', 'Mali'), ('NE', 'Niger'), ('BZ', 'Belize'), ('TH', 'Thailand'), ('CN', 'China'), ('BQ', 'Bonaire, Sint Eustatius and Saba'), ('NG', 'Nigeria'), ('LU', 'Luxembourg'), ('BT', 'Bhutan'), ('NO', 'Norway'), ('CI', "Côte d'Ivoire"), ('LS', 'Lesotho')], max_length=20)), + ('zipcode', models.CharField(verbose_name='zip code', max_length=10, validators=[django.core.validators.RegexValidator('^[0-9A-Z]{3,10}$', 'Enter a valid zipcode.')])), + ('country', models.CharField(verbose_name='country', default='ES', choices=[('BZ', 'Belize'), ('MZ', 'Mozambique'), ('ER', 'Eritrea'), ('AL', 'Albania'), ('CU', 'Cuba'), ('AM', 'Armenia'), ('ZW', 'Zimbabwe'), ('RU', 'Russian Federation'), ('PR', 'Puerto Rico'), ('MM', 'Myanmar'), ('UG', 'Uganda'), ('IQ', 'Iraq'), ('RS', 'Serbia'), ('KM', 'Comoros'), ('MY', 'Malaysia'), ('PH', 'Philippines'), ('TJ', 'Tajikistan'), ('GA', 'Gabon'), ('CL', 'Chile'), ('AG', 'Antigua and Barbuda'), ('DM', 'Dominica'), ('TC', 'Turks and Caicos Islands'), ('KI', 'Kiribati'), ('KZ', 'Kazakhstan'), ('ME', 'Montenegro'), ('BD', 'Bangladesh'), ('KW', 'Kuwait'), ('LI', 'Liechtenstein'), ('PS', 'Palestine, State of'), ('BI', 'Burundi'), ('TR', 'Turkey'), ('GF', 'French Guiana'), ('CD', 'Congo (the Democratic Republic of the)'), ('AU', 'Australia'), ('BR', 'Brazil'), ('SH', 'Saint Helena, Ascension and Tristan da Cunha'), ('PM', 'Saint Pierre and Miquelon'), ('NG', 'Nigeria'), ('TL', 'Timor-Leste'), ('LR', 'Liberia'), ('AF', 'Afghanistan'), ('HM', 'Heard Island and McDonald Islands'), ('SI', 'Slovenia'), ('MP', 'Northern Mariana Islands'), ('SN', 'Senegal'), ('PF', 'French Polynesia'), ('NZ', 'New Zealand'), ('TD', 'Chad'), ('PW', 'Palau'), ('FJ', 'Fiji'), ('PE', 'Peru'), ('CR', 'Costa Rica'), ('GD', 'Grenada'), ('CZ', 'Czech Republic'), ('YT', 'Mayotte'), ('AW', 'Aruba'), ('SK', 'Slovakia'), ('YE', 'Yemen'), ('BW', 'Botswana'), ('MK', 'Macedonia (the former Yugoslav Republic of)'), ('KR', 'Korea (the Republic of)'), ('VU', 'Vanuatu'), ('BV', 'Bouvet Island'), ('CM', 'Cameroon'), ('ZM', 'Zambia'), ('LB', 'Lebanon'), ('SE', 'Sweden'), ('NE', 'Niger'), ('CG', 'Congo'), ('IN', 'India'), ('IL', 'Israel'), ('TT', 'Trinidad and Tobago'), ('EE', 'Estonia'), ('MX', 'Mexico'), ('TW', 'Taiwan (Province of China)'), ('AI', 'Anguilla'), ('OM', 'Oman'), ('ML', 'Mali'), ('NP', 'Nepal'), ('VE', 'Venezuela (Bolivarian Republic of)'), ('BJ', 'Benin'), ('MT', 'Malta'), ('AZ', 'Azerbaijan'), ('UA', 'Ukraine'), ('JO', 'Jordan'), ('TZ', 'Tanzania, United Republic of'), ('AX', 'Åland Islands'), ('PT', 'Portugal'), ('NU', 'Niue'), ('VG', 'Virgin Islands (British)'), ('TH', 'Thailand'), ('CY', 'Cyprus'), ('AR', 'Argentina'), ('CO', 'Colombia'), ('IE', 'Ireland'), ('LA', "Lao People's Democratic Republic"), ('MS', 'Montserrat'), ('AD', 'Andorra'), ('SC', 'Seychelles'), ('PN', 'Pitcairn'), ('TN', 'Tunisia'), ('GI', 'Gibraltar'), ('GU', 'Guam'), ('SB', 'Solomon Islands'), ('MC', 'Monaco'), ('CN', 'China'), ('ZA', 'South Africa'), ('KE', 'Kenya'), ('IT', 'Italy'), ('HR', 'Croatia'), ('GY', 'Guyana'), ('BG', 'Bulgaria'), ('HU', 'Hungary'), ('CC', 'Cocos (Keeling) Islands'), ('MR', 'Mauritania'), ('SY', 'Syrian Arab Republic'), ('CF', 'Central African Republic'), ('KN', 'Saint Kitts and Nevis'), ('SX', 'Sint Maarten (Dutch part)'), ('SJ', 'Svalbard and Jan Mayen'), ('GH', 'Ghana'), ('VI', 'Virgin Islands (U.S.)'), ('HN', 'Honduras'), ('KG', 'Kyrgyzstan'), ('GQ', 'Equatorial Guinea'), ('IS', 'Iceland'), ('JP', 'Japan'), ('BL', 'Saint Barthélemy'), ('GB', 'United Kingdom of Great Britain and Northern Ireland'), ('TF', 'French Southern Territories'), ('IO', 'British Indian Ocean Territory'), ('PY', 'Paraguay'), ('RE', 'Réunion'), ('GG', 'Guernsey'), ('RW', 'Rwanda'), ('FI', 'Finland'), ('CA', 'Canada'), ('IM', 'Isle of Man'), ('ES', 'Spain'), ('HT', 'Haiti'), ('VN', 'Viet Nam'), ('WF', 'Wallis and Futuna'), ('GL', 'Greenland'), ('GP', 'Guadeloupe'), ('EG', 'Egypt'), ('BA', 'Bosnia and Herzegovina'), ('IR', 'Iran (Islamic Republic of)'), ('HK', 'Hong Kong'), ('TG', 'Togo'), ('PG', 'Papua New Guinea'), ('SS', 'South Sudan'), ('AS', 'American Samoa'), ('LC', 'Saint Lucia'), ('LU', 'Luxembourg'), ('SO', 'Somalia'), ('JE', 'Jersey'), ('GR', 'Greece'), ('EH', 'Western Sahara'), ('MU', 'Mauritius'), ('CI', "Côte d'Ivoire"), ('BH', 'Bahrain'), ('BF', 'Burkina Faso'), ('TM', 'Turkmenistan'), ('PK', 'Pakistan'), ('KY', 'Cayman Islands'), ('GE', 'Georgia'), ('VC', 'Saint Vincent and the Grenadines'), ('FR', 'France'), ('AQ', 'Antarctica'), ('LT', 'Lithuania'), ('BY', 'Belarus'), ('DK', 'Denmark'), ('RO', 'Romania'), ('GT', 'Guatemala'), ('SM', 'San Marino'), ('CW', 'Curaçao'), ('MO', 'Macao'), ('MV', 'Maldives'), ('DE', 'Germany'), ('UZ', 'Uzbekistan'), ('TK', 'Tokelau'), ('FO', 'Faroe Islands'), ('NI', 'Nicaragua'), ('MF', 'Saint Martin (French part)'), ('UM', 'United States Minor Outlying Islands'), ('LK', 'Sri Lanka'), ('NL', 'Netherlands'), ('NR', 'Nauru'), ('BO', 'Bolivia (Plurinational State of)'), ('GN', 'Guinea'), ('AE', 'United Arab Emirates'), ('BE', 'Belgium'), ('NA', 'Namibia'), ('BN', 'Brunei Darussalam'), ('MW', 'Malawi'), ('BQ', 'Bonaire, Sint Eustatius and Saba'), ('ET', 'Ethiopia'), ('CK', 'Cook Islands'), ('BT', 'Bhutan'), ('DO', 'Dominican Republic'), ('DZ', 'Algeria'), ('MQ', 'Martinique'), ('DJ', 'Djibouti'), ('ST', 'Sao Tome and Principe'), ('KH', 'Cambodia'), ('CX', 'Christmas Island'), ('CV', 'Cabo Verde'), ('QA', 'Qatar'), ('GS', 'South Georgia and the South Sandwich Islands'), ('FK', 'Falkland Islands [Malvinas]'), ('BS', 'Bahamas'), ('GW', 'Guinea-Bissau'), ('MA', 'Morocco'), ('PL', 'Poland'), ('ID', 'Indonesia'), ('GM', 'Gambia'), ('US', 'United States of America'), ('MN', 'Mongolia'), ('CH', 'Switzerland'), ('MH', 'Marshall Islands'), ('SR', 'Suriname'), ('EC', 'Ecuador'), ('SA', 'Saudi Arabia'), ('JM', 'Jamaica'), ('MG', 'Madagascar'), ('FM', 'Micronesia (Federated States of)'), ('AO', 'Angola'), ('SL', 'Sierra Leone'), ('KP', "Korea (the Democratic People's Republic of)"), ('BB', 'Barbados'), ('NC', 'New Caledonia'), ('TV', 'Tuvalu'), ('BM', 'Bermuda'), ('LS', 'Lesotho'), ('AT', 'Austria'), ('UY', 'Uruguay'), ('SG', 'Singapore'), ('TO', 'Tonga'), ('NF', 'Norfolk Island'), ('MD', 'Moldova (the Republic of)'), ('SZ', 'Swaziland'), ('WS', 'Samoa'), ('PA', 'Panama'), ('SD', 'Sudan'), ('NO', 'Norway'), ('LY', 'Libya'), ('LV', 'Latvia'), ('VA', 'Holy See'), ('SV', 'El Salvador')], max_length=20)), ('vat', models.CharField(verbose_name='VAT number', max_length=64)), - ('account', models.OneToOneField(verbose_name='account', related_name='billcontact', to=settings.AUTH_USER_MODEL)), + ('account', models.OneToOneField(related_name='billcontact', to=settings.AUTH_USER_MODEL, verbose_name='account')), ], ), migrations.CreateModel( name='BillLine', fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), + ('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), ('description', models.CharField(verbose_name='description', max_length=256)), - ('rate', models.DecimalField(verbose_name='rate', decimal_places=2, max_digits=12, null=True, blank=True)), + ('rate', models.DecimalField(null=True, verbose_name='rate', decimal_places=2, blank=True, max_digits=12)), ('quantity', models.DecimalField(verbose_name='quantity', decimal_places=2, max_digits=12)), ('verbose_quantity', models.CharField(verbose_name='Verbose quantity', max_length=16)), ('subtotal', models.DecimalField(verbose_name='subtotal', decimal_places=2, max_digits=12)), - ('tax', models.DecimalField(verbose_name='tax', decimal_places=2, max_digits=2)), - ('order_billed_on', models.DateField(verbose_name='order billed', null=True, blank=True)), - ('order_billed_until', models.DateField(verbose_name='order billed until', null=True, blank=True)), - ('created_on', models.DateField(verbose_name='created', auto_now_add=True)), - ('amended_line', models.ForeignKey(verbose_name='amended line', blank=True, null=True, related_name='amendment_lines', to='bills.BillLine')), - ('bill', models.ForeignKey(verbose_name='bill', related_name='lines', to='bills.Bill')), - ('order', models.ForeignKey(help_text='Informative link back to the order', blank=True, on_delete=django.db.models.deletion.SET_NULL, to='orders.Order', null=True)), + ('tax', models.DecimalField(verbose_name='tax', decimal_places=2, max_digits=4)), + ('start_on', models.DateField(verbose_name='start')), + ('end_on', models.DateField(null=True, verbose_name='end')), + ('order_billed_on', models.DateField(null=True, verbose_name='order billed', blank=True)), + ('order_billed_until', models.DateField(null=True, verbose_name='order billed until', blank=True)), + ('created_on', models.DateField(auto_now_add=True, verbose_name='created')), + ('amended_line', models.ForeignKey(related_name='amendment_lines', blank=True, to='bills.BillLine', null=True, verbose_name='amended line')), + ('bill', models.ForeignKey(related_name='lines', to='bills.Bill', verbose_name='bill')), + ('order', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.SET_NULL, null=True, to='orders.Order', help_text='Informative link back to the order')), ], ), migrations.CreateModel( name='BillSubline', fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), + ('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), ('description', models.CharField(verbose_name='description', max_length=256)), ('total', models.DecimalField(decimal_places=2, max_digits=12)), ('type', models.CharField(verbose_name='type', default='OTHER', choices=[('VOLUME', 'Volume'), ('COMPENSATION', 'Compensation'), ('OTHER', 'Other')], max_length=16)), - ('line', models.ForeignKey(verbose_name='bill line', related_name='sublines', to='bills.BillLine')), + ('line', models.ForeignKey(related_name='sublines', to='bills.BillLine', verbose_name='bill line')), ], ), migrations.CreateModel( diff --git a/orchestra/contrib/bills/migrations/0002_auto_20150413_1937.py b/orchestra/contrib/bills/migrations/0002_auto_20150413_1937.py deleted file mode 100644 index 30b23cbb..00000000 --- a/orchestra/contrib/bills/migrations/0002_auto_20150413_1937.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import models, migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('bills', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='billcontact', - name='country', - field=models.CharField(choices=[('KZ', 'Kazakhstan'), ('IM', 'Isle of Man'), ('VE', 'Venezuela (Bolivarian Republic of)'), ('PW', 'Palau'), ('WF', 'Wallis and Futuna'), ('HK', 'Hong Kong'), ('BO', 'Bolivia (Plurinational State of)'), ('RE', 'Réunion'), ('PS', 'Palestine, State of'), ('IE', 'Ireland'), ('CH', 'Switzerland'), ('AR', 'Argentina'), ('LA', "Lao People's Democratic Republic"), ('BA', 'Bosnia and Herzegovina'), ('IR', 'Iran (Islamic Republic of)'), ('BD', 'Bangladesh'), ('ER', 'Eritrea'), ('SH', 'Saint Helena, Ascension and Tristan da Cunha'), ('SJ', 'Svalbard and Jan Mayen'), ('ZW', 'Zimbabwe'), ('IN', 'India'), ('TW', 'Taiwan (Province of China)'), ('DO', 'Dominican Republic'), ('PE', 'Peru'), ('HT', 'Haiti'), ('MO', 'Macao'), ('ST', 'Sao Tome and Principe'), ('VG', 'Virgin Islands (British)'), ('ME', 'Montenegro'), ('IT', 'Italy'), ('IQ', 'Iraq'), ('MT', 'Malta'), ('AG', 'Antigua and Barbuda'), ('UZ', 'Uzbekistan'), ('KN', 'Saint Kitts and Nevis'), ('TD', 'Chad'), ('AI', 'Anguilla'), ('MM', 'Myanmar'), ('AM', 'Armenia'), ('UY', 'Uruguay'), ('BB', 'Barbados'), ('BN', 'Brunei Darussalam'), ('CN', 'China'), ('AL', 'Albania'), ('AQ', 'Antarctica'), ('GT', 'Guatemala'), ('NR', 'Nauru'), ('UM', 'United States Minor Outlying Islands'), ('MP', 'Northern Mariana Islands'), ('SR', 'Suriname'), ('GY', 'Guyana'), ('LV', 'Latvia'), ('LS', 'Lesotho'), ('ES', 'Spain'), ('TC', 'Turks and Caicos Islands'), ('VA', 'Holy See'), ('NZ', 'New Zealand'), ('SK', 'Slovakia'), ('BE', 'Belgium'), ('TG', 'Togo'), ('SN', 'Senegal'), ('CG', 'Congo'), ('MN', 'Mongolia'), ('GA', 'Gabon'), ('GW', 'Guinea-Bissau'), ('HU', 'Hungary'), ('TR', 'Turkey'), ('GE', 'Georgia'), ('EH', 'Western Sahara'), ('PN', 'Pitcairn'), ('FJ', 'Fiji'), ('TV', 'Tuvalu'), ('AZ', 'Azerbaijan'), ('MZ', 'Mozambique'), ('GL', 'Greenland'), ('US', 'United States of America'), ('BF', 'Burkina Faso'), ('BT', 'Bhutan'), ('VN', 'Viet Nam'), ('PM', 'Saint Pierre and Miquelon'), ('PY', 'Paraguay'), ('FR', 'France'), ('DZ', 'Algeria'), ('LT', 'Lithuania'), ('NU', 'Niue'), ('MY', 'Malaysia'), ('DM', 'Dominica'), ('NC', 'New Caledonia'), ('NA', 'Namibia'), ('WS', 'Samoa'), ('MW', 'Malawi'), ('BW', 'Botswana'), ('SM', 'San Marino'), ('HM', 'Heard Island and McDonald Islands'), ('IS', 'Iceland'), ('CF', 'Central African Republic'), ('SB', 'Solomon Islands'), ('LK', 'Sri Lanka'), ('ID', 'Indonesia'), ('GR', 'Greece'), ('CO', 'Colombia'), ('MK', 'Macedonia (the former Yugoslav Republic of)'), ('KR', 'Korea (the Republic of)'), ('SZ', 'Swaziland'), ('KE', 'Kenya'), ('AF', 'Afghanistan'), ('AE', 'United Arab Emirates'), ('DK', 'Denmark'), ('TZ', 'Tanzania, United Republic of'), ('AD', 'Andorra'), ('KH', 'Cambodia'), ('CY', 'Cyprus'), ('GS', 'South Georgia and the South Sandwich Islands'), ('EG', 'Egypt'), ('UG', 'Uganda'), ('TK', 'Tokelau'), ('MS', 'Montserrat'), ('YT', 'Mayotte'), ('MU', 'Mauritius'), ('BS', 'Bahamas'), ('CD', 'Congo (the Democratic Republic of the)'), ('CZ', 'Czech Republic'), ('CR', 'Costa Rica'), ('NL', 'Netherlands'), ('GQ', 'Equatorial Guinea'), ('SS', 'South Sudan'), ('RW', 'Rwanda'), ('VU', 'Vanuatu'), ('DE', 'Germany'), ('PL', 'Poland'), ('CX', 'Christmas Island'), ('AO', 'Angola'), ('BZ', 'Belize'), ('CK', 'Cook Islands'), ('TO', 'Tonga'), ('MA', 'Morocco'), ('CU', 'Cuba'), ('JM', 'Jamaica'), ('NI', 'Nicaragua'), ('AT', 'Austria'), ('FI', 'Finland'), ('FO', 'Faroe Islands'), ('VI', 'Virgin Islands (U.S.)'), ('BR', 'Brazil'), ('SY', 'Syrian Arab Republic'), ('ET', 'Ethiopia'), ('BJ', 'Benin'), ('PH', 'Philippines'), ('AS', 'American Samoa'), ('TL', 'Timor-Leste'), ('AU', 'Australia'), ('SX', 'Sint Maarten (Dutch part)'), ('PG', 'Papua New Guinea'), ('NG', 'Nigeria'), ('SL', 'Sierra Leone'), ('LB', 'Lebanon'), ('OM', 'Oman'), ('SG', 'Singapore'), ('CM', 'Cameroon'), ('PT', 'Portugal'), ('KM', 'Comoros'), ('IO', 'British Indian Ocean Territory'), ('BM', 'Bermuda'), ('YE', 'Yemen'), ('RU', 'Russian Federation'), ('GM', 'Gambia'), ('SI', 'Slovenia'), ('GI', 'Gibraltar'), ('LY', 'Libya'), ('GU', 'Guam'), ('LU', 'Luxembourg'), ('RO', 'Romania'), ('MD', 'Moldova (the Republic of)'), ('BL', 'Saint Barthélemy'), ('GB', 'United Kingdom of Great Britain and Northern Ireland'), ('EE', 'Estonia'), ('LC', 'Saint Lucia'), ('TJ', 'Tajikistan'), ('IL', 'Israel'), ('PA', 'Panama'), ('PR', 'Puerto Rico'), ('CL', 'Chile'), ('KP', "Korea (the Democratic People's Republic of)"), ('GF', 'French Guiana'), ('CI', "Côte d'Ivoire"), ('MR', 'Mauritania'), ('NF', 'Norfolk Island'), ('BG', 'Bulgaria'), ('SD', 'Sudan'), ('NO', 'Norway'), ('GG', 'Guernsey'), ('CV', 'Cabo Verde'), ('GP', 'Guadeloupe'), ('BV', 'Bouvet Island'), ('TT', 'Trinidad and Tobago'), ('SO', 'Somalia'), ('DJ', 'Djibouti'), ('MC', 'Monaco'), ('JP', 'Japan'), ('NP', 'Nepal'), ('JE', 'Jersey'), ('TN', 'Tunisia'), ('RS', 'Serbia'), ('NE', 'Niger'), ('ML', 'Mali'), ('KW', 'Kuwait'), ('PF', 'French Polynesia'), ('ZA', 'South Africa'), ('GH', 'Ghana'), ('BH', 'Bahrain'), ('CC', 'Cocos (Keeling) Islands'), ('MQ', 'Martinique'), ('AW', 'Aruba'), ('BQ', 'Bonaire, Sint Eustatius and Saba'), ('JO', 'Jordan'), ('LI', 'Liechtenstein'), ('TM', 'Turkmenistan'), ('MX', 'Mexico'), ('LR', 'Liberia'), ('GD', 'Grenada'), ('HN', 'Honduras'), ('SA', 'Saudi Arabia'), ('PK', 'Pakistan'), ('CA', 'Canada'), ('CW', 'Curaçao'), ('SV', 'El Salvador'), ('SC', 'Seychelles'), ('QA', 'Qatar'), ('EC', 'Ecuador'), ('VC', 'Saint Vincent and the Grenadines'), ('HR', 'Croatia'), ('MV', 'Maldives'), ('KI', 'Kiribati'), ('FM', 'Micronesia (Federated States of)'), ('BY', 'Belarus'), ('FK', 'Falkland Islands [Malvinas]'), ('TF', 'French Southern Territories'), ('AX', 'Åland Islands'), ('MG', 'Madagascar'), ('SE', 'Sweden'), ('BI', 'Burundi'), ('KY', 'Cayman Islands'), ('MF', 'Saint Martin (French part)'), ('ZM', 'Zambia'), ('GN', 'Guinea'), ('UA', 'Ukraine'), ('TH', 'Thailand'), ('KG', 'Kyrgyzstan'), ('MH', 'Marshall Islands')], verbose_name='country', max_length=20, default='ES'), - ), - migrations.AlterField( - model_name='billline', - name='tax', - field=models.DecimalField(decimal_places=2, verbose_name='tax', max_digits=4), - ), - ] diff --git a/orchestra/contrib/bills/migrations/0002_auto_20150429_1343.py b/orchestra/contrib/bills/migrations/0002_auto_20150429_1343.py new file mode 100644 index 00000000..6a2d8c88 --- /dev/null +++ b/orchestra/contrib/bills/migrations/0002_auto_20150429_1343.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('bills', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='billcontact', + name='country', + field=models.CharField(verbose_name='country', choices=[('ZA', 'South Africa'), ('TG', 'Togo'), ('SZ', 'Swaziland'), ('MF', 'Saint Martin (French part)'), ('GG', 'Guernsey'), ('FR', 'France'), ('CR', 'Costa Rica'), ('NA', 'Namibia'), ('AD', 'Andorra'), ('NR', 'Nauru'), ('NU', 'Niue'), ('NP', 'Nepal'), ('BD', 'Bangladesh'), ('SK', 'Slovakia'), ('VC', 'Saint Vincent and the Grenadines'), ('SE', 'Sweden'), ('US', 'United States of America'), ('CH', 'Switzerland'), ('TZ', 'Tanzania, United Republic of'), ('SO', 'Somalia'), ('TC', 'Turks and Caicos Islands'), ('MX', 'Mexico'), ('SX', 'Sint Maarten (Dutch part)'), ('ID', 'Indonesia'), ('SL', 'Sierra Leone'), ('SN', 'Senegal'), ('PY', 'Paraguay'), ('PA', 'Panama'), ('KZ', 'Kazakhstan'), ('LA', "Lao People's Democratic Republic"), ('MT', 'Malta'), ('EE', 'Estonia'), ('KG', 'Kyrgyzstan'), ('LB', 'Lebanon'), ('BZ', 'Belize'), ('MR', 'Mauritania'), ('GE', 'Georgia'), ('KY', 'Cayman Islands'), ('VA', 'Holy See'), ('TM', 'Turkmenistan'), ('GI', 'Gibraltar'), ('HT', 'Haiti'), ('AE', 'United Arab Emirates'), ('BB', 'Barbados'), ('GT', 'Guatemala'), ('HN', 'Honduras'), ('CX', 'Christmas Island'), ('CL', 'Chile'), ('NO', 'Norway'), ('BN', 'Brunei Darussalam'), ('QA', 'Qatar'), ('BM', 'Bermuda'), ('HU', 'Hungary'), ('BA', 'Bosnia and Herzegovina'), ('ST', 'Sao Tome and Principe'), ('OM', 'Oman'), ('AS', 'American Samoa'), ('CO', 'Colombia'), ('KH', 'Cambodia'), ('SC', 'Seychelles'), ('GS', 'South Georgia and the South Sandwich Islands'), ('BO', 'Bolivia (Plurinational State of)'), ('MU', 'Mauritius'), ('CF', 'Central African Republic'), ('GD', 'Grenada'), ('MK', 'Macedonia (the former Yugoslav Republic of)'), ('EC', 'Ecuador'), ('PR', 'Puerto Rico'), ('LY', 'Libya'), ('ZM', 'Zambia'), ('PH', 'Philippines'), ('TN', 'Tunisia'), ('MS', 'Montserrat'), ('MH', 'Marshall Islands'), ('CA', 'Canada'), ('HR', 'Croatia'), ('KN', 'Saint Kitts and Nevis'), ('TR', 'Turkey'), ('GN', 'Guinea'), ('PL', 'Poland'), ('GB', 'United Kingdom of Great Britain and Northern Ireland'), ('IM', 'Isle of Man'), ('SY', 'Syrian Arab Republic'), ('TJ', 'Tajikistan'), ('AF', 'Afghanistan'), ('AL', 'Albania'), ('BW', 'Botswana'), ('BL', 'Saint Barthélemy'), ('LU', 'Luxembourg'), ('LC', 'Saint Lucia'), ('TV', 'Tuvalu'), ('GH', 'Ghana'), ('SV', 'El Salvador'), ('FK', 'Falkland Islands [Malvinas]'), ('GU', 'Guam'), ('CW', 'Curaçao'), ('ER', 'Eritrea'), ('PF', 'French Polynesia'), ('CM', 'Cameroon'), ('RE', 'Réunion'), ('DE', 'Germany'), ('MN', 'Mongolia'), ('MZ', 'Mozambique'), ('MA', 'Morocco'), ('PW', 'Palau'), ('BT', 'Bhutan'), ('PT', 'Portugal'), ('BJ', 'Benin'), ('AT', 'Austria'), ('MG', 'Madagascar'), ('AX', 'Åland Islands'), ('PS', 'Palestine, State of'), ('YE', 'Yemen'), ('WS', 'Samoa'), ('MD', 'Moldova (the Republic of)'), ('MQ', 'Martinique'), ('MC', 'Monaco'), ('GA', 'Gabon'), ('GQ', 'Equatorial Guinea'), ('MO', 'Macao'), ('CY', 'Cyprus'), ('ES', 'Spain'), ('NF', 'Norfolk Island'), ('CC', 'Cocos (Keeling) Islands'), ('HM', 'Heard Island and McDonald Islands'), ('KI', 'Kiribati'), ('DJ', 'Djibouti'), ('RS', 'Serbia'), ('KR', 'Korea (the Republic of)'), ('TT', 'Trinidad and Tobago'), ('CU', 'Cuba'), ('VE', 'Venezuela (Bolivarian Republic of)'), ('BV', 'Bouvet Island'), ('JE', 'Jersey'), ('SS', 'South Sudan'), ('GL', 'Greenland'), ('TF', 'French Southern Territories'), ('BI', 'Burundi'), ('VG', 'Virgin Islands (British)'), ('LR', 'Liberia'), ('NL', 'Netherlands'), ('UA', 'Ukraine'), ('TW', 'Taiwan (Province of China)'), ('GY', 'Guyana'), ('UZ', 'Uzbekistan'), ('TO', 'Tonga'), ('RU', 'Russian Federation'), ('HK', 'Hong Kong'), ('GF', 'French Guiana'), ('UY', 'Uruguay'), ('JM', 'Jamaica'), ('DO', 'Dominican Republic'), ('AW', 'Aruba'), ('LT', 'Lithuania'), ('BR', 'Brazil'), ('PN', 'Pitcairn'), ('SD', 'Sudan'), ('BG', 'Bulgaria'), ('MM', 'Myanmar'), ('SR', 'Suriname'), ('AR', 'Argentina'), ('AZ', 'Azerbaijan'), ('AQ', 'Antarctica'), ('FJ', 'Fiji'), ('AI', 'Anguilla'), ('GR', 'Greece'), ('CI', "Côte d'Ivoire"), ('LS', 'Lesotho'), ('GW', 'Guinea-Bissau'), ('AO', 'Angola'), ('IR', 'Iran (Islamic Republic of)'), ('LI', 'Liechtenstein'), ('MY', 'Malaysia'), ('CN', 'China'), ('KM', 'Comoros'), ('ML', 'Mali'), ('SJ', 'Svalbard and Jan Mayen'), ('PK', 'Pakistan'), ('IT', 'Italy'), ('AU', 'Australia'), ('UG', 'Uganda'), ('TH', 'Thailand'), ('CG', 'Congo'), ('IN', 'India'), ('ET', 'Ethiopia'), ('SH', 'Saint Helena, Ascension and Tristan da Cunha'), ('LV', 'Latvia'), ('SI', 'Slovenia'), ('CZ', 'Czech Republic'), ('NI', 'Nicaragua'), ('BS', 'Bahamas'), ('SA', 'Saudi Arabia'), ('IS', 'Iceland'), ('FI', 'Finland'), ('NC', 'New Caledonia'), ('ME', 'Montenegro'), ('ZW', 'Zimbabwe'), ('AM', 'Armenia'), ('PE', 'Peru'), ('GM', 'Gambia'), ('KP', "Korea (the Democratic People's Republic of)"), ('EG', 'Egypt'), ('BF', 'Burkina Faso'), ('PM', 'Saint Pierre and Miquelon'), ('TK', 'Tokelau'), ('FM', 'Micronesia (Federated States of)'), ('AG', 'Antigua and Barbuda'), ('VN', 'Viet Nam'), ('SG', 'Singapore'), ('BQ', 'Bonaire, Sint Eustatius and Saba'), ('KE', 'Kenya'), ('YT', 'Mayotte'), ('TD', 'Chad'), ('NE', 'Niger'), ('JO', 'Jordan'), ('IO', 'British Indian Ocean Territory'), ('FO', 'Faroe Islands'), ('CD', 'Congo (the Democratic Republic of the)'), ('IQ', 'Iraq'), ('IE', 'Ireland'), ('DK', 'Denmark'), ('RW', 'Rwanda'), ('VI', 'Virgin Islands (U.S.)'), ('JP', 'Japan'), ('TL', 'Timor-Leste'), ('PG', 'Papua New Guinea'), ('NG', 'Nigeria'), ('VU', 'Vanuatu'), ('LK', 'Sri Lanka'), ('SM', 'San Marino'), ('IL', 'Israel'), ('MP', 'Northern Mariana Islands'), ('WF', 'Wallis and Futuna'), ('SB', 'Solomon Islands'), ('DM', 'Dominica'), ('EH', 'Western Sahara'), ('KW', 'Kuwait'), ('RO', 'Romania'), ('BY', 'Belarus'), ('BE', 'Belgium'), ('CK', 'Cook Islands'), ('UM', 'United States Minor Outlying Islands'), ('MV', 'Maldives'), ('GP', 'Guadeloupe'), ('NZ', 'New Zealand'), ('MW', 'Malawi'), ('CV', 'Cabo Verde'), ('DZ', 'Algeria'), ('BH', 'Bahrain')], max_length=20, default='ES'), + ), + ] diff --git a/orchestra/contrib/bills/migrations/0003_auto_20150420_1223.py b/orchestra/contrib/bills/migrations/0003_auto_20150420_1223.py deleted file mode 100644 index 802b87aa..00000000 --- a/orchestra/contrib/bills/migrations/0003_auto_20150420_1223.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import models, migrations -from django.utils.timezone import utc -import datetime - - -class Migration(migrations.Migration): - - dependencies = [ - ('bills', '0002_auto_20150413_1937'), - ] - - operations = [ - migrations.AddField( - model_name='billline', - name='end_on', - field=models.DateTimeField(null=True), - ), - migrations.AddField( - model_name='billline', - name='start_on', - field=models.DateTimeField(default=datetime.datetime(2015, 4, 20, 12, 23, 38, 471684, tzinfo=utc)), - preserve_default=False, - ), - migrations.AlterField( - model_name='billcontact', - name='country', - field=models.CharField(max_length=20, verbose_name='country', default='ES', choices=[('IQ', 'Iraq'), ('MN', 'Mongolia'), ('CX', 'Christmas Island'), ('RO', 'Romania'), ('KR', 'Korea (the Republic of)'), ('TH', 'Thailand'), ('FO', 'Faroe Islands'), ('CZ', 'Czech Republic'), ('ER', 'Eritrea'), ('MA', 'Morocco'), ('SA', 'Saudi Arabia'), ('SB', 'Solomon Islands'), ('GA', 'Gabon'), ('RS', 'Serbia'), ('HM', 'Heard Island and McDonald Islands'), ('GW', 'Guinea-Bissau'), ('KE', 'Kenya'), ('BE', 'Belgium'), ('MV', 'Maldives'), ('SR', 'Suriname'), ('AZ', 'Azerbaijan'), ('KG', 'Kyrgyzstan'), ('UA', 'Ukraine'), ('CF', 'Central African Republic'), ('PM', 'Saint Pierre and Miquelon'), ('GU', 'Guam'), ('ZM', 'Zambia'), ('AI', 'Anguilla'), ('VU', 'Vanuatu'), ('MZ', 'Mozambique'), ('TF', 'French Southern Territories'), ('PG', 'Papua New Guinea'), ('TT', 'Trinidad and Tobago'), ('NF', 'Norfolk Island'), ('KM', 'Comoros'), ('JM', 'Jamaica'), ('NU', 'Niue'), ('MH', 'Marshall Islands'), ('AL', 'Albania'), ('KY', 'Cayman Islands'), ('FR', 'France'), ('BA', 'Bosnia and Herzegovina'), ('GD', 'Grenada'), ('KP', "Korea (the Democratic People's Republic of)"), ('SZ', 'Swaziland'), ('TN', 'Tunisia'), ('CR', 'Costa Rica'), ('IO', 'British Indian Ocean Territory'), ('BY', 'Belarus'), ('ST', 'Sao Tome and Principe'), ('VC', 'Saint Vincent and the Grenadines'), ('CH', 'Switzerland'), ('AG', 'Antigua and Barbuda'), ('TO', 'Tonga'), ('CG', 'Congo'), ('MC', 'Monaco'), ('PS', 'Palestine, State of'), ('YE', 'Yemen'), ('PW', 'Palau'), ('VG', 'Virgin Islands (British)'), ('MQ', 'Martinique'), ('NZ', 'New Zealand'), ('TZ', 'Tanzania, United Republic of'), ('KZ', 'Kazakhstan'), ('NC', 'New Caledonia'), ('IT', 'Italy'), ('BQ', 'Bonaire, Sint Eustatius and Saba'), ('GI', 'Gibraltar'), ('EE', 'Estonia'), ('PN', 'Pitcairn'), ('TV', 'Tuvalu'), ('TJ', 'Tajikistan'), ('FJ', 'Fiji'), ('OM', 'Oman'), ('MY', 'Malaysia'), ('GL', 'Greenland'), ('PE', 'Peru'), ('SX', 'Sint Maarten (Dutch part)'), ('CY', 'Cyprus'), ('GG', 'Guernsey'), ('GS', 'South Georgia and the South Sandwich Islands'), ('SK', 'Slovakia'), ('BO', 'Bolivia (Plurinational State of)'), ('CI', "Côte d'Ivoire"), ('MG', 'Madagascar'), ('UZ', 'Uzbekistan'), ('IR', 'Iran (Islamic Republic of)'), ('CV', 'Cabo Verde'), ('MX', 'Mexico'), ('GM', 'Gambia'), ('TC', 'Turks and Caicos Islands'), ('TK', 'Tokelau'), ('BZ', 'Belize'), ('SE', 'Sweden'), ('WF', 'Wallis and Futuna'), ('HT', 'Haiti'), ('MR', 'Mauritania'), ('GN', 'Guinea'), ('MU', 'Mauritius'), ('GB', 'United Kingdom of Great Britain and Northern Ireland'), ('LS', 'Lesotho'), ('LU', 'Luxembourg'), ('JE', 'Jersey'), ('MF', 'Saint Martin (French part)'), ('PF', 'French Polynesia'), ('IS', 'Iceland'), ('LA', "Lao People's Democratic Republic"), ('IN', 'India'), ('AX', 'Åland Islands'), ('VN', 'Viet Nam'), ('MM', 'Myanmar'), ('RW', 'Rwanda'), ('WS', 'Samoa'), ('MW', 'Malawi'), ('EH', 'Western Sahara'), ('GH', 'Ghana'), ('DO', 'Dominican Republic'), ('HN', 'Honduras'), ('AS', 'American Samoa'), ('TD', 'Chad'), ('NG', 'Nigeria'), ('DJ', 'Djibouti'), ('ZA', 'South Africa'), ('BI', 'Burundi'), ('TM', 'Turkmenistan'), ('EC', 'Ecuador'), ('GE', 'Georgia'), ('NP', 'Nepal'), ('AT', 'Austria'), ('PA', 'Panama'), ('BR', 'Brazil'), ('MD', 'Moldova (the Republic of)'), ('GY', 'Guyana'), ('KH', 'Cambodia'), ('CL', 'Chile'), ('NO', 'Norway'), ('SJ', 'Svalbard and Jan Mayen'), ('BJ', 'Benin'), ('CO', 'Colombia'), ('CC', 'Cocos (Keeling) Islands'), ('SH', 'Saint Helena, Ascension and Tristan da Cunha'), ('UM', 'United States Minor Outlying Islands'), ('BF', 'Burkina Faso'), ('UG', 'Uganda'), ('GR', 'Greece'), ('TW', 'Taiwan (Province of China)'), ('SO', 'Somalia'), ('DE', 'Germany'), ('PL', 'Poland'), ('TL', 'Timor-Leste'), ('BT', 'Bhutan'), ('CA', 'Canada'), ('HR', 'Croatia'), ('BB', 'Barbados'), ('LR', 'Liberia'), ('PR', 'Puerto Rico'), ('GF', 'French Guiana'), ('IM', 'Isle of Man'), ('VI', 'Virgin Islands (U.S.)'), ('HU', 'Hungary'), ('ES', 'Spain'), ('AR', 'Argentina'), ('CU', 'Cuba'), ('AU', 'Australia'), ('NI', 'Nicaragua'), ('SS', 'South Sudan'), ('IE', 'Ireland'), ('BH', 'Bahrain'), ('GQ', 'Equatorial Guinea'), ('SC', 'Seychelles'), ('PH', 'Philippines'), ('SM', 'San Marino'), ('ID', 'Indonesia'), ('HK', 'Hong Kong'), ('VE', 'Venezuela (Bolivarian Republic of)'), ('PY', 'Paraguay'), ('ZW', 'Zimbabwe'), ('GT', 'Guatemala'), ('CD', 'Congo (the Democratic Republic of the)'), ('ME', 'Montenegro'), ('RE', 'Réunion'), ('LK', 'Sri Lanka'), ('FK', 'Falkland Islands [Malvinas]'), ('BL', 'Saint Barthélemy'), ('NR', 'Nauru'), ('LV', 'Latvia'), ('KW', 'Kuwait'), ('IL', 'Israel'), ('BV', 'Bouvet Island'), ('SY', 'Syrian Arab Republic'), ('BS', 'Bahamas'), ('CW', 'Curaçao'), ('CM', 'Cameroon'), ('SV', 'El Salvador'), ('SL', 'Sierra Leone'), ('DM', 'Dominica'), ('US', 'United States of America'), ('LB', 'Lebanon'), ('AD', 'Andorra'), ('CN', 'China'), ('SN', 'Senegal'), ('LI', 'Liechtenstein'), ('JP', 'Japan'), ('KI', 'Kiribati'), ('BM', 'Bermuda'), ('EG', 'Egypt'), ('UY', 'Uruguay'), ('BD', 'Bangladesh'), ('PK', 'Pakistan'), ('MT', 'Malta'), ('CK', 'Cook Islands'), ('MK', 'Macedonia (the former Yugoslav Republic of)'), ('SI', 'Slovenia'), ('ET', 'Ethiopia'), ('BG', 'Bulgaria'), ('GP', 'Guadeloupe'), ('BW', 'Botswana'), ('VA', 'Holy See'), ('AO', 'Angola'), ('AQ', 'Antarctica'), ('LY', 'Libya'), ('TR', 'Turkey'), ('TG', 'Togo'), ('LT', 'Lithuania'), ('QA', 'Qatar'), ('AM', 'Armenia'), ('DZ', 'Algeria'), ('SD', 'Sudan'), ('ML', 'Mali'), ('MP', 'Northern Mariana Islands'), ('LC', 'Saint Lucia'), ('NA', 'Namibia'), ('MO', 'Macao'), ('KN', 'Saint Kitts and Nevis'), ('JO', 'Jordan'), ('RU', 'Russian Federation'), ('AW', 'Aruba'), ('AF', 'Afghanistan'), ('SG', 'Singapore'), ('DK', 'Denmark'), ('MS', 'Montserrat'), ('YT', 'Mayotte'), ('NL', 'Netherlands'), ('FM', 'Micronesia (Federated States of)'), ('BN', 'Brunei Darussalam'), ('AE', 'United Arab Emirates'), ('PT', 'Portugal'), ('NE', 'Niger'), ('FI', 'Finland')]), - ), - ] diff --git a/orchestra/contrib/bills/migrations/0004_auto_20150421_1058.py b/orchestra/contrib/bills/migrations/0004_auto_20150421_1058.py deleted file mode 100644 index 8a249056..00000000 --- a/orchestra/contrib/bills/migrations/0004_auto_20150421_1058.py +++ /dev/null @@ -1,29 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import models, migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('bills', '0003_auto_20150420_1223'), - ] - - operations = [ - migrations.AlterField( - model_name='billcontact', - name='country', - field=models.CharField(default='ES', choices=[('NA', 'Namibia'), ('BD', 'Bangladesh'), ('RW', 'Rwanda'), ('LC', 'Saint Lucia'), ('VU', 'Vanuatu'), ('AO', 'Angola'), ('VC', 'Saint Vincent and the Grenadines'), ('ET', 'Ethiopia'), ('DZ', 'Algeria'), ('GL', 'Greenland'), ('BN', 'Brunei Darussalam'), ('AF', 'Afghanistan'), ('NL', 'Netherlands'), ('SE', 'Sweden'), ('UM', 'United States Minor Outlying Islands'), ('SN', 'Senegal'), ('YT', 'Mayotte'), ('FR', 'France'), ('GS', 'South Georgia and the South Sandwich Islands'), ('KY', 'Cayman Islands'), ('NC', 'New Caledonia'), ('JM', 'Jamaica'), ('AT', 'Austria'), ('TR', 'Turkey'), ('TF', 'French Southern Territories'), ('RS', 'Serbia'), ('CW', 'Curaçao'), ('BF', 'Burkina Faso'), ('AQ', 'Antarctica'), ('IR', 'Iran (Islamic Republic of)'), ('NE', 'Niger'), ('DJ', 'Djibouti'), ('LR', 'Liberia'), ('PK', 'Pakistan'), ('CR', 'Costa Rica'), ('EG', 'Egypt'), ('TM', 'Turkmenistan'), ('TG', 'Togo'), ('US', 'United States of America'), ('MO', 'Macao'), ('TN', 'Tunisia'), ('MS', 'Montserrat'), ('MQ', 'Martinique'), ('DM', 'Dominica'), ('BA', 'Bosnia and Herzegovina'), ('SO', 'Somalia'), ('MD', 'Moldova (the Republic of)'), ('GY', 'Guyana'), ('MV', 'Maldives'), ('BL', 'Saint Barthélemy'), ('CG', 'Congo'), ('TT', 'Trinidad and Tobago'), ('GH', 'Ghana'), ('NP', 'Nepal'), ('CA', 'Canada'), ('AL', 'Albania'), ('BG', 'Bulgaria'), ('IN', 'India'), ('LV', 'Latvia'), ('FK', 'Falkland Islands [Malvinas]'), ('CI', "Côte d'Ivoire"), ('SD', 'Sudan'), ('TK', 'Tokelau'), ('SJ', 'Svalbard and Jan Mayen'), ('LB', 'Lebanon'), ('GW', 'Guinea-Bissau'), ('SL', 'Sierra Leone'), ('MX', 'Mexico'), ('IE', 'Ireland'), ('BY', 'Belarus'), ('AD', 'Andorra'), ('CM', 'Cameroon'), ('GM', 'Gambia'), ('MU', 'Mauritius'), ('ME', 'Montenegro'), ('VN', 'Viet Nam'), ('CN', 'China'), ('PR', 'Puerto Rico'), ('RE', 'Réunion'), ('AR', 'Argentina'), ('DO', 'Dominican Republic'), ('TZ', 'Tanzania, United Republic of'), ('BB', 'Barbados'), ('BI', 'Burundi'), ('EE', 'Estonia'), ('JO', 'Jordan'), ('BE', 'Belgium'), ('OM', 'Oman'), ('SZ', 'Swaziland'), ('BO', 'Bolivia (Plurinational State of)'), ('HT', 'Haiti'), ('LY', 'Libya'), ('CO', 'Colombia'), ('NU', 'Niue'), ('AE', 'United Arab Emirates'), ('YE', 'Yemen'), ('MR', 'Mauritania'), ('CC', 'Cocos (Keeling) Islands'), ('MK', 'Macedonia (the former Yugoslav Republic of)'), ('FI', 'Finland'), ('PT', 'Portugal'), ('CX', 'Christmas Island'), ('VG', 'Virgin Islands (British)'), ('KZ', 'Kazakhstan'), ('MN', 'Mongolia'), ('UG', 'Uganda'), ('QA', 'Qatar'), ('MA', 'Morocco'), ('MT', 'Malta'), ('HN', 'Honduras'), ('LI', 'Liechtenstein'), ('DK', 'Denmark'), ('PL', 'Poland'), ('NF', 'Norfolk Island'), ('NI', 'Nicaragua'), ('KM', 'Comoros'), ('TH', 'Thailand'), ('MY', 'Malaysia'), ('SH', 'Saint Helena, Ascension and Tristan da Cunha'), ('IO', 'British Indian Ocean Territory'), ('PE', 'Peru'), ('UY', 'Uruguay'), ('TW', 'Taiwan (Province of China)'), ('FJ', 'Fiji'), ('LT', 'Lithuania'), ('JP', 'Japan'), ('AI', 'Anguilla'), ('VI', 'Virgin Islands (U.S.)'), ('MF', 'Saint Martin (French part)'), ('EC', 'Ecuador'), ('BW', 'Botswana'), ('CK', 'Cook Islands'), ('SY', 'Syrian Arab Republic'), ('HK', 'Hong Kong'), ('GP', 'Guadeloupe'), ('AX', 'Åland Islands'), ('PH', 'Philippines'), ('TO', 'Tonga'), ('MC', 'Monaco'), ('UA', 'Ukraine'), ('PY', 'Paraguay'), ('ZA', 'South Africa'), ('BV', 'Bouvet Island'), ('ZW', 'Zimbabwe'), ('KR', 'Korea (the Republic of)'), ('NO', 'Norway'), ('UZ', 'Uzbekistan'), ('IL', 'Israel'), ('GG', 'Guernsey'), ('GQ', 'Equatorial Guinea'), ('FO', 'Faroe Islands'), ('NR', 'Nauru'), ('SG', 'Singapore'), ('JE', 'Jersey'), ('ID', 'Indonesia'), ('AW', 'Aruba'), ('BT', 'Bhutan'), ('HR', 'Croatia'), ('AS', 'American Samoa'), ('SC', 'Seychelles'), ('TV', 'Tuvalu'), ('GT', 'Guatemala'), ('FM', 'Micronesia (Federated States of)'), ('IQ', 'Iraq'), ('ES', 'Spain'), ('KH', 'Cambodia'), ('BM', 'Bermuda'), ('BH', 'Bahrain'), ('TL', 'Timor-Leste'), ('CU', 'Cuba'), ('SX', 'Sint Maarten (Dutch part)'), ('BQ', 'Bonaire, Sint Eustatius and Saba'), ('BS', 'Bahamas'), ('RU', 'Russian Federation'), ('PG', 'Papua New Guinea'), ('SI', 'Slovenia'), ('KP', "Korea (the Democratic People's Republic of)"), ('IS', 'Iceland'), ('ER', 'Eritrea'), ('NG', 'Nigeria'), ('LK', 'Sri Lanka'), ('PF', 'French Polynesia'), ('DE', 'Germany'), ('MH', 'Marshall Islands'), ('TD', 'Chad'), ('KE', 'Kenya'), ('CF', 'Central African Republic'), ('IM', 'Isle of Man'), ('BR', 'Brazil'), ('CD', 'Congo (the Democratic Republic of the)'), ('KI', 'Kiribati'), ('GN', 'Guinea'), ('GB', 'United Kingdom of Great Britain and Northern Ireland'), ('ZM', 'Zambia'), ('CY', 'Cyprus'), ('ST', 'Sao Tome and Principe'), ('GE', 'Georgia'), ('SM', 'San Marino'), ('AG', 'Antigua and Barbuda'), ('MW', 'Malawi'), ('SS', 'South Sudan'), ('GU', 'Guam'), ('HU', 'Hungary'), ('CL', 'Chile'), ('LS', 'Lesotho'), ('MP', 'Northern Mariana Islands'), ('ML', 'Mali'), ('GF', 'French Guiana'), ('CH', 'Switzerland'), ('SK', 'Slovakia'), ('VA', 'Holy See'), ('WF', 'Wallis and Futuna'), ('PA', 'Panama'), ('SB', 'Solomon Islands'), ('SR', 'Suriname'), ('PN', 'Pitcairn'), ('LA', "Lao People's Democratic Republic"), ('BJ', 'Benin'), ('BZ', 'Belize'), ('PW', 'Palau'), ('IT', 'Italy'), ('MM', 'Myanmar'), ('NZ', 'New Zealand'), ('SV', 'El Salvador'), ('GR', 'Greece'), ('GA', 'Gabon'), ('LU', 'Luxembourg'), ('MZ', 'Mozambique'), ('KN', 'Saint Kitts and Nevis'), ('AZ', 'Azerbaijan'), ('CV', 'Cabo Verde'), ('SA', 'Saudi Arabia'), ('EH', 'Western Sahara'), ('AU', 'Australia'), ('WS', 'Samoa'), ('PS', 'Palestine, State of'), ('KG', 'Kyrgyzstan'), ('VE', 'Venezuela (Bolivarian Republic of)'), ('KW', 'Kuwait'), ('CZ', 'Czech Republic'), ('RO', 'Romania'), ('MG', 'Madagascar'), ('HM', 'Heard Island and McDonald Islands'), ('AM', 'Armenia'), ('GI', 'Gibraltar'), ('TC', 'Turks and Caicos Islands'), ('PM', 'Saint Pierre and Miquelon'), ('TJ', 'Tajikistan'), ('GD', 'Grenada')], max_length=20, verbose_name='country'), - ), - migrations.AlterField( - model_name='billline', - name='end_on', - field=models.DateField(verbose_name='end', null=True), - ), - migrations.AlterField( - model_name='billline', - name='start_on', - field=models.DateField(verbose_name='start'), - ), - ] diff --git a/orchestra/contrib/contacts/migrations/0001_initial.py b/orchestra/contrib/contacts/migrations/0001_initial.py new file mode 100644 index 00000000..e3334496 --- /dev/null +++ b/orchestra/contrib/contacts/migrations/0001_initial.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import orchestra.contrib.contacts.validators +from django.conf import settings +import django.core.validators +import orchestra.models.fields + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Contact', + fields=[ + ('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)), + ('short_name', models.CharField(max_length=128, verbose_name='short name')), + ('full_name', models.CharField(max_length=256, blank=True, verbose_name='full name')), + ('email', models.EmailField(max_length=254)), + ('email_usage', orchestra.models.fields.MultiSelectField(max_length=256, blank=True, default=('SUPPORT', 'ADMIN', 'BILLING', 'TECH', 'ADDS', 'EMERGENCY'), verbose_name='email usage', choices=[('SUPPORT', 'Support tickets'), ('ADMIN', 'Administrative'), ('BILLING', 'Billing'), ('TECH', 'Technical'), ('ADDS', 'Announcements'), ('EMERGENCY', 'Emergency contact')])), + ('phone', models.CharField(max_length=32, blank=True, verbose_name='phone', validators=[orchestra.contrib.contacts.validators.validate_phone])), + ('phone2', models.CharField(max_length=32, blank=True, verbose_name='alternative phone', validators=[orchestra.contrib.contacts.validators.validate_phone])), + ('address', models.TextField(blank=True, verbose_name='address')), + ('city', models.CharField(max_length=128, blank=True, verbose_name='city')), + ('zipcode', models.CharField(max_length=10, blank=True, verbose_name='zip code', validators=[django.core.validators.RegexValidator('^[0-9,A-Z]{3,10}$', 'Enter a valid zipcode.', 'invalid')])), + ('country', models.CharField(max_length=20, blank=True, default='ES', verbose_name='country', choices=[('AU', 'Australia'), ('RS', 'Serbia'), ('BO', 'Bolivia (Plurinational State of)'), ('KG', 'Kyrgyzstan'), ('LV', 'Latvia'), ('IN', 'India'), ('ET', 'Ethiopia'), ('VC', 'Saint Vincent and the Grenadines'), ('HK', 'Hong Kong'), ('CA', 'Canada'), ('TZ', 'Tanzania, United Republic of'), ('BB', 'Barbados'), ('VI', 'Virgin Islands (U.S.)'), ('RE', 'Réunion'), ('DE', 'Germany'), ('GQ', 'Equatorial Guinea'), ('DK', 'Denmark'), ('BL', 'Saint Barthélemy'), ('GA', 'Gabon'), ('KM', 'Comoros'), ('AF', 'Afghanistan'), ('MS', 'Montserrat'), ('MO', 'Macao'), ('MD', 'Moldova (the Republic of)'), ('LS', 'Lesotho'), ('GD', 'Grenada'), ('LY', 'Libya'), ('SH', 'Saint Helena, Ascension and Tristan da Cunha'), ('IM', 'Isle of Man'), ('BS', 'Bahamas'), ('GY', 'Guyana'), ('LT', 'Lithuania'), ('ZM', 'Zambia'), ('LU', 'Luxembourg'), ('CN', 'China'), ('HU', 'Hungary'), ('FM', 'Micronesia (Federated States of)'), ('NU', 'Niue'), ('VE', 'Venezuela (Bolivarian Republic of)'), ('TR', 'Turkey'), ('PH', 'Philippines'), ('CG', 'Congo'), ('IL', 'Israel'), ('MZ', 'Mozambique'), ('NI', 'Nicaragua'), ('CY', 'Cyprus'), ('HM', 'Heard Island and McDonald Islands'), ('BH', 'Bahrain'), ('AT', 'Austria'), ('KR', 'Korea (the Republic of)'), ('MA', 'Morocco'), ('KZ', 'Kazakhstan'), ('WS', 'Samoa'), ('US', 'United States of America'), ('DJ', 'Djibouti'), ('CC', 'Cocos (Keeling) Islands'), ('TO', 'Tonga'), ('GU', 'Guam'), ('MC', 'Monaco'), ('AO', 'Angola'), ('MH', 'Marshall Islands'), ('GG', 'Guernsey'), ('LA', "Lao People's Democratic Republic"), ('CX', 'Christmas Island'), ('BN', 'Brunei Darussalam'), ('SV', 'El Salvador'), ('EC', 'Ecuador'), ('CK', 'Cook Islands'), ('IT', 'Italy'), ('ML', 'Mali'), ('CU', 'Cuba'), ('TG', 'Togo'), ('CI', "Côte d'Ivoire"), ('ST', 'Sao Tome and Principe'), ('FO', 'Faroe Islands'), ('HR', 'Croatia'), ('ES', 'Spain'), ('UY', 'Uruguay'), ('BE', 'Belgium'), ('MX', 'Mexico'), ('YE', 'Yemen'), ('CH', 'Switzerland'), ('PM', 'Saint Pierre and Miquelon'), ('SN', 'Senegal'), ('SO', 'Somalia'), ('AM', 'Armenia'), ('SY', 'Syrian Arab Republic'), ('NC', 'New Caledonia'), ('CO', 'Colombia'), ('BF', 'Burkina Faso'), ('GS', 'South Georgia and the South Sandwich Islands'), ('NR', 'Nauru'), ('ME', 'Montenegro'), ('PY', 'Paraguay'), ('BA', 'Bosnia and Herzegovina'), ('WF', 'Wallis and Futuna'), ('NA', 'Namibia'), ('EE', 'Estonia'), ('SM', 'San Marino'), ('SL', 'Sierra Leone'), ('LK', 'Sri Lanka'), ('AR', 'Argentina'), ('GW', 'Guinea-Bissau'), ('DM', 'Dominica'), ('BQ', 'Bonaire, Sint Eustatius and Saba'), ('TM', 'Turkmenistan'), ('VU', 'Vanuatu'), ('KE', 'Kenya'), ('KY', 'Cayman Islands'), ('TF', 'French Southern Territories'), ('JM', 'Jamaica'), ('AE', 'United Arab Emirates'), ('TL', 'Timor-Leste'), ('GF', 'French Guiana'), ('GH', 'Ghana'), ('TC', 'Turks and Caicos Islands'), ('CZ', 'Czech Republic'), ('KW', 'Kuwait'), ('HT', 'Haiti'), ('CM', 'Cameroon'), ('GR', 'Greece'), ('UZ', 'Uzbekistan'), ('PT', 'Portugal'), ('BJ', 'Benin'), ('SR', 'Suriname'), ('CR', 'Costa Rica'), ('BV', 'Bouvet Island'), ('NF', 'Norfolk Island'), ('ER', 'Eritrea'), ('MT', 'Malta'), ('SA', 'Saudi Arabia'), ('MK', 'Macedonia (the former Yugoslav Republic of)'), ('AD', 'Andorra'), ('BY', 'Belarus'), ('KP', "Korea (the Democratic People's Republic of)"), ('SC', 'Seychelles'), ('IE', 'Ireland'), ('UG', 'Uganda'), ('LR', 'Liberia'), ('PN', 'Pitcairn'), ('MM', 'Myanmar'), ('SJ', 'Svalbard and Jan Mayen'), ('EH', 'Western Sahara'), ('LC', 'Saint Lucia'), ('MQ', 'Martinique'), ('ZW', 'Zimbabwe'), ('FR', 'France'), ('BM', 'Bermuda'), ('NP', 'Nepal'), ('BD', 'Bangladesh'), ('CW', 'Curaçao'), ('JE', 'Jersey'), ('IS', 'Iceland'), ('PG', 'Papua New Guinea'), ('GI', 'Gibraltar'), ('SX', 'Sint Maarten (Dutch part)'), ('IR', 'Iran (Islamic Republic of)'), ('TT', 'Trinidad and Tobago'), ('TD', 'Chad'), ('SZ', 'Swaziland'), ('MW', 'Malawi'), ('PE', 'Peru'), ('TN', 'Tunisia'), ('NZ', 'New Zealand'), ('CD', 'Congo (the Democratic Republic of the)'), ('RW', 'Rwanda'), ('IQ', 'Iraq'), ('GB', 'United Kingdom of Great Britain and Northern Ireland'), ('FI', 'Finland'), ('LI', 'Liechtenstein'), ('UA', 'Ukraine'), ('AQ', 'Antarctica'), ('KH', 'Cambodia'), ('BG', 'Bulgaria'), ('SK', 'Slovakia'), ('OM', 'Oman'), ('AZ', 'Azerbaijan'), ('ZA', 'South Africa'), ('CF', 'Central African Republic'), ('SD', 'Sudan'), ('FK', 'Falkland Islands [Malvinas]'), ('SB', 'Solomon Islands'), ('ID', 'Indonesia'), ('QA', 'Qatar'), ('MY', 'Malaysia'), ('TH', 'Thailand'), ('CL', 'Chile'), ('TK', 'Tokelau'), ('AL', 'Albania'), ('JP', 'Japan'), ('GM', 'Gambia'), ('VG', 'Virgin Islands (British)'), ('KI', 'Kiribati'), ('MN', 'Mongolia'), ('HN', 'Honduras'), ('SE', 'Sweden'), ('YT', 'Mayotte'), ('UM', 'United States Minor Outlying Islands'), ('NG', 'Nigeria'), ('MF', 'Saint Martin (French part)'), ('NL', 'Netherlands'), ('AX', 'Åland Islands'), ('PS', 'Palestine, State of'), ('GN', 'Guinea'), ('IO', 'British Indian Ocean Territory'), ('SG', 'Singapore'), ('RO', 'Romania'), ('NO', 'Norway'), ('PA', 'Panama'), ('FJ', 'Fiji'), ('CV', 'Cabo Verde'), ('MP', 'Northern Mariana Islands'), ('GE', 'Georgia'), ('PW', 'Palau'), ('VA', 'Holy See'), ('NE', 'Niger'), ('RU', 'Russian Federation'), ('AS', 'American Samoa'), ('MR', 'Mauritania'), ('GP', 'Guadeloupe'), ('BT', 'Bhutan'), ('KN', 'Saint Kitts and Nevis'), ('AI', 'Anguilla'), ('GL', 'Greenland'), ('PK', 'Pakistan'), ('PF', 'French Polynesia'), ('DO', 'Dominican Republic'), ('BR', 'Brazil'), ('JO', 'Jordan'), ('TW', 'Taiwan (Province of China)'), ('TV', 'Tuvalu'), ('MU', 'Mauritius'), ('BW', 'Botswana'), ('EG', 'Egypt'), ('BZ', 'Belize'), ('LB', 'Lebanon'), ('GT', 'Guatemala'), ('MV', 'Maldives'), ('PL', 'Poland'), ('TJ', 'Tajikistan'), ('MG', 'Madagascar'), ('VN', 'Viet Nam'), ('SI', 'Slovenia'), ('AG', 'Antigua and Barbuda'), ('DZ', 'Algeria'), ('PR', 'Puerto Rico'), ('SS', 'South Sudan'), ('BI', 'Burundi'), ('AW', 'Aruba')])), + ('account', models.ForeignKey(null=True, related_name='contacts', to=settings.AUTH_USER_MODEL, verbose_name='Account')), + ], + ), + ] diff --git a/orchestra/contrib/contacts/migrations/__init__.py b/orchestra/contrib/contacts/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/orchestra/contrib/databases/migrations/0001_initial.py b/orchestra/contrib/databases/migrations/0001_initial.py index 24b3d879..838aeed4 100644 --- a/orchestra/contrib/databases/migrations/0001_initial.py +++ b/orchestra/contrib/databases/migrations/0001_initial.py @@ -2,8 +2,8 @@ from __future__ import unicode_literals from django.db import models, migrations -import orchestra.core.validators from django.conf import settings +import orchestra.core.validators class Migration(migrations.Migration): @@ -16,20 +16,20 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Database', fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), - ('name', models.CharField(max_length=64, validators=[orchestra.core.validators.validate_name], verbose_name='name')), - ('type', models.CharField(max_length=32, default='mysql', choices=[('mysql', 'MySQL')], verbose_name='type')), - ('account', models.ForeignKey(verbose_name='Account', to=settings.AUTH_USER_MODEL, related_name='databases')), + ('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)), + ('name', models.CharField(validators=[orchestra.core.validators.validate_name], verbose_name='name', max_length=64)), + ('type', models.CharField(max_length=32, verbose_name='type', choices=[('mysql', 'MySQL')], default='mysql')), + ('account', models.ForeignKey(to=settings.AUTH_USER_MODEL, verbose_name='Account', related_name='databases')), ], ), migrations.CreateModel( name='DatabaseUser', fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), - ('username', models.CharField(max_length=16, validators=[orchestra.core.validators.validate_name], verbose_name='username')), - ('password', models.CharField(max_length=256, verbose_name='password')), - ('type', models.CharField(max_length=32, default='mysql', choices=[('mysql', 'MySQL')], verbose_name='type')), - ('account', models.ForeignKey(verbose_name='Account', to=settings.AUTH_USER_MODEL, related_name='databaseusers')), + ('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)), + ('username', models.CharField(validators=[orchestra.core.validators.validate_name], verbose_name='username', max_length=16)), + ('password', models.CharField(verbose_name='password', max_length=256)), + ('type', models.CharField(max_length=32, verbose_name='type', choices=[('mysql', 'MySQL')], default='mysql')), + ('account', models.ForeignKey(to=settings.AUTH_USER_MODEL, verbose_name='Account', related_name='databaseusers')), ], options={ 'verbose_name_plural': 'DB users', @@ -38,7 +38,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='database', name='users', - field=models.ManyToManyField(verbose_name='users', related_name='databases', to='databases.DatabaseUser'), + field=models.ManyToManyField(to='databases.DatabaseUser', verbose_name='users', blank=True, related_name='databases'), ), migrations.AlterUniqueTogether( name='databaseuser', diff --git a/orchestra/contrib/domains/migrations/0001_initial.py b/orchestra/contrib/domains/migrations/0001_initial.py index 2925a8b9..dca8d048 100644 --- a/orchestra/contrib/domains/migrations/0001_initial.py +++ b/orchestra/contrib/domains/migrations/0001_initial.py @@ -2,9 +2,9 @@ from __future__ import unicode_literals from django.db import models, migrations +import orchestra.contrib.domains.utils import orchestra.contrib.domains.validators from django.conf import settings -import orchestra.contrib.domains.utils class Migration(migrations.Migration): @@ -17,21 +17,21 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Domain', fields=[ - ('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)), - ('name', models.CharField(validators=[orchestra.contrib.domains.validators.validate_domain_name, orchestra.contrib.domains.validators.validate_allowed_domain], help_text='Domain or subdomain name.', unique=True, max_length=256, verbose_name='name')), - ('serial', models.IntegerField(help_text='Serial number', default=orchestra.contrib.domains.utils.generate_zone_serial, verbose_name='serial')), - ('account', models.ForeignKey(help_text='Automatically selected for subdomains.', blank=True, verbose_name='Account', to=settings.AUTH_USER_MODEL, related_name='domains')), - ('top', models.ForeignKey(related_name='subdomain_set', null=True, to='domains.Domain', editable=False)), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(validators=[orchestra.contrib.domains.validators.validate_domain_name, orchestra.contrib.domains.validators.validate_allowed_domain], max_length=256, help_text='Domain or subdomain name.', unique=True, verbose_name='name')), + ('serial', models.IntegerField(default=orchestra.contrib.domains.utils.generate_zone_serial, help_text='Serial number', verbose_name='serial')), + ('account', models.ForeignKey(to=settings.AUTH_USER_MODEL, verbose_name='Account', blank=True, help_text='Automatically selected for subdomains.', related_name='domains')), + ('top', models.ForeignKey(to='domains.Domain', null=True, editable=False, related_name='subdomain_set')), ], ), migrations.CreateModel( name='Record', fields=[ - ('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)), - ('ttl', models.CharField(validators=[orchestra.contrib.domains.validators.validate_zone_interval], help_text='Record TTL, defaults to 1h', blank=True, max_length=8, verbose_name='TTL')), - ('type', models.CharField(choices=[('MX', 'MX'), ('NS', 'NS'), ('CNAME', 'CNAME'), ('A', 'A (IPv4 address)'), ('AAAA', 'AAAA (IPv6 address)'), ('SRV', 'SRV'), ('TXT', 'TXT'), ('SOA', 'SOA')], max_length=32, verbose_name='type')), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('ttl', models.CharField(validators=[orchestra.contrib.domains.validators.validate_zone_interval], max_length=8, help_text='Record TTL, defaults to 1h', blank=True, verbose_name='TTL')), + ('type', models.CharField(max_length=32, choices=[('MX', 'MX'), ('NS', 'NS'), ('CNAME', 'CNAME'), ('A', 'A (IPv4 address)'), ('AAAA', 'AAAA (IPv6 address)'), ('SRV', 'SRV'), ('TXT', 'TXT'), ('SOA', 'SOA')], verbose_name='type')), ('value', models.CharField(max_length=256, verbose_name='value')), - ('domain', models.ForeignKey(verbose_name='domain', to='domains.Domain', related_name='records')), + ('domain', models.ForeignKey(to='domains.Domain', verbose_name='domain', related_name='records')), ], ), ] diff --git a/orchestra/contrib/issues/migrations/0001_initial.py b/orchestra/contrib/issues/migrations/0001_initial.py index cd2842ec..73ababd8 100644 --- a/orchestra/contrib/issues/migrations/0001_initial.py +++ b/orchestra/contrib/issues/migrations/0001_initial.py @@ -2,8 +2,8 @@ from __future__ import unicode_literals from django.db import models, migrations -from django.conf import settings import orchestra.models.fields +from django.conf import settings class Migration(migrations.Migration): @@ -16,11 +16,11 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Message', fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)), - ('author_name', models.CharField(verbose_name='author name', blank=True, max_length=256)), + ('id', models.AutoField(auto_created=True, primary_key=True, verbose_name='ID', serialize=False)), + ('author_name', models.CharField(verbose_name='author name', max_length=256, blank=True)), ('content', models.TextField(verbose_name='content')), ('created_on', models.DateTimeField(verbose_name='created on', auto_now_add=True)), - ('author', models.ForeignKey(verbose_name='author', related_name='ticket_messages', to=settings.AUTH_USER_MODEL)), + ('author', models.ForeignKey(related_name='ticket_messages', to=settings.AUTH_USER_MODEL, verbose_name='author')), ], options={ 'get_latest_by': 'id', @@ -29,28 +29,28 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Queue', fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)), - ('name', models.CharField(verbose_name='name', unique=True, max_length=128)), - ('verbose_name', models.CharField(verbose_name='verbose_name', blank=True, max_length=128)), - ('default', models.BooleanField(verbose_name='default', default=False)), - ('notify', orchestra.models.fields.MultiSelectField(blank=True, default=('SUPPORT', 'ADMIN', 'BILLING', 'TECH', 'ADDS', 'EMERGENCY'), choices=[('SUPPORT', 'Support tickets'), ('ADMIN', 'Administrative'), ('BILLING', 'Billing'), ('TECH', 'Technical'), ('ADDS', 'Announcements'), ('EMERGENCY', 'Emergency contact')], help_text='Contacts to notify by email', verbose_name='notify', max_length=256)), + ('id', models.AutoField(auto_created=True, primary_key=True, verbose_name='ID', serialize=False)), + ('name', models.CharField(unique=True, verbose_name='name', max_length=128)), + ('verbose_name', models.CharField(verbose_name='verbose_name', max_length=128, blank=True)), + ('default', models.BooleanField(default=False, verbose_name='default')), + ('notify', orchestra.models.fields.MultiSelectField(choices=[('SUPPORT', 'Support tickets'), ('ADMIN', 'Administrative'), ('BILLING', 'Billing'), ('TECH', 'Technical'), ('ADDS', 'Announcements'), ('EMERGENCY', 'Emergency contact')], help_text='Contacts to notify by email', verbose_name='notify', blank=True, default=('SUPPORT', 'ADMIN', 'BILLING', 'TECH', 'ADDS', 'EMERGENCY'), max_length=256)), ], ), migrations.CreateModel( name='Ticket', fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)), - ('creator_name', models.CharField(verbose_name='creator name', blank=True, max_length=256)), + ('id', models.AutoField(auto_created=True, primary_key=True, verbose_name='ID', serialize=False)), + ('creator_name', models.CharField(verbose_name='creator name', max_length=256, blank=True)), ('subject', models.CharField(verbose_name='subject', max_length=256)), ('description', models.TextField(verbose_name='description')), - ('priority', models.CharField(choices=[('HIGH', 'High'), ('MEDIUM', 'Medium'), ('LOW', 'Low')], verbose_name='priority', default='MEDIUM', max_length=32)), - ('state', models.CharField(choices=[('NEW', 'New'), ('IN_PROGRESS', 'In Progress'), ('RESOLVED', 'Resolved'), ('FEEDBACK', 'Feedback'), ('REJECTED', 'Rejected'), ('CLOSED', 'Closed')], verbose_name='state', default='NEW', max_length=32)), + ('priority', models.CharField(choices=[('HIGH', 'High'), ('MEDIUM', 'Medium'), ('LOW', 'Low')], default='MEDIUM', max_length=32, verbose_name='priority')), + ('state', models.CharField(choices=[('NEW', 'New'), ('IN_PROGRESS', 'In Progress'), ('RESOLVED', 'Resolved'), ('FEEDBACK', 'Feedback'), ('REJECTED', 'Rejected'), ('CLOSED', 'Closed')], default='NEW', max_length=32, verbose_name='state')), ('created_at', models.DateTimeField(verbose_name='created', auto_now_add=True)), ('updated_at', models.DateTimeField(verbose_name='modified', auto_now=True)), - ('cc', models.TextField(verbose_name='CC', blank=True, help_text='emails to send a carbon copy to')), - ('creator', models.ForeignKey(to=settings.AUTH_USER_MODEL, verbose_name='created by', related_name='tickets_created', null=True)), - ('owner', models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, verbose_name='assigned to', related_name='tickets_owned', null=True)), - ('queue', models.ForeignKey(blank=True, to='issues.Queue', related_name='tickets', null=True)), + ('cc', models.TextField(help_text='emails to send a carbon copy to', verbose_name='CC', blank=True)), + ('creator', models.ForeignKey(null=True, related_name='tickets_created', to=settings.AUTH_USER_MODEL, verbose_name='created by')), + ('owner', models.ForeignKey(null=True, related_name='tickets_owned', blank=True, to=settings.AUTH_USER_MODEL, verbose_name='assigned to')), + ('queue', models.ForeignKey(null=True, related_name='tickets', blank=True, to='issues.Queue')), ], options={ 'ordering': ['-updated_at'], @@ -59,15 +59,15 @@ class Migration(migrations.Migration): migrations.CreateModel( name='TicketTracker', fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)), - ('ticket', models.ForeignKey(verbose_name='ticket', related_name='trackers', to='issues.Ticket')), - ('user', models.ForeignKey(verbose_name='user', related_name='ticket_trackers', to=settings.AUTH_USER_MODEL)), + ('id', models.AutoField(auto_created=True, primary_key=True, verbose_name='ID', serialize=False)), + ('ticket', models.ForeignKey(related_name='trackers', to='issues.Ticket', verbose_name='ticket')), + ('user', models.ForeignKey(related_name='ticket_trackers', to=settings.AUTH_USER_MODEL, verbose_name='user')), ], ), migrations.AddField( model_name='message', name='ticket', - field=models.ForeignKey(verbose_name='ticket', related_name='messages', to='issues.Ticket'), + field=models.ForeignKey(related_name='messages', to='issues.Ticket', verbose_name='ticket'), ), migrations.AlterUniqueTogether( name='tickettracker', diff --git a/orchestra/contrib/lists/migrations/0001_initial.py b/orchestra/contrib/lists/migrations/0001_initial.py index 186ebe1b..abc72e8c 100644 --- a/orchestra/contrib/lists/migrations/0001_initial.py +++ b/orchestra/contrib/lists/migrations/0001_initial.py @@ -2,28 +2,28 @@ from __future__ import unicode_literals from django.db import models, migrations -from django.conf import settings import orchestra.core.validators +from django.conf import settings class Migration(migrations.Migration): dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('domains', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='List', fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, primary_key=True, auto_created=True)), - ('name', models.CharField(max_length=128, unique=True, verbose_name='name', validators=[orchestra.core.validators.validate_name], help_text='Default list address <name>@lists.pangea.org')), - ('address_name', models.CharField(blank=True, verbose_name='address name', validators=[orchestra.core.validators.validate_name], max_length=128)), - ('admin_email', models.EmailField(max_length=254, verbose_name='admin email', help_text='Administration email address')), - ('is_active', models.BooleanField(verbose_name='active', default=True, help_text='Designates whether this account should be treated as active. Unselect this instead of deleting accounts.')), - ('account', models.ForeignKey(related_name='lists', verbose_name='Account', to=settings.AUTH_USER_MODEL)), - ('address_domain', models.ForeignKey(blank=True, null=True, verbose_name='address domain', to='domains.Domain')), + ('id', models.AutoField(verbose_name='ID', auto_created=True, serialize=False, primary_key=True)), + ('name', models.CharField(verbose_name='name', help_text='Default list address <name>@lists.pangea.org', validators=[orchestra.core.validators.validate_name], max_length=128, unique=True)), + ('address_name', models.CharField(verbose_name='address name', blank=True, validators=[orchestra.core.validators.validate_name], max_length=128)), + ('admin_email', models.EmailField(verbose_name='admin email', help_text='Administration email address', max_length=254)), + ('is_active', models.BooleanField(verbose_name='active', help_text='Designates whether this account should be treated as active. Unselect this instead of deleting accounts.', default=True)), + ('account', models.ForeignKey(verbose_name='Account', related_name='lists', to=settings.AUTH_USER_MODEL)), + ('address_domain', models.ForeignKey(verbose_name='address domain', null=True, blank=True, to='domains.Domain')), ], ), migrations.AlterUniqueTogether( diff --git a/orchestra/contrib/mailboxes/migrations/0001_initial.py b/orchestra/contrib/mailboxes/migrations/0001_initial.py index cd339b3a..ae3e7b65 100644 --- a/orchestra/contrib/mailboxes/migrations/0001_initial.py +++ b/orchestra/contrib/mailboxes/migrations/0001_initial.py @@ -2,27 +2,27 @@ from __future__ import unicode_literals from django.db import models, migrations -import orchestra.contrib.mailboxes.validators from django.conf import settings +import orchestra.contrib.mailboxes.validators import django.core.validators class Migration(migrations.Migration): dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('domains', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Address', fields=[ - ('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), - ('name', models.CharField(max_length=64, validators=[orchestra.contrib.mailboxes.validators.validate_emailname], help_text='Address name, left blank for a catch-all address', verbose_name='name', blank=True)), - ('forward', models.CharField(max_length=256, validators=[orchestra.contrib.mailboxes.validators.validate_forward], help_text='Space separated email addresses or mailboxes', verbose_name='forward', blank=True)), - ('account', models.ForeignKey(related_name='addresses', verbose_name='Account', to=settings.AUTH_USER_MODEL)), - ('domain', models.ForeignKey(related_name='addresses', verbose_name='domain', to='domains.Domain')), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(help_text='Address name, left blank for a catch-all address', validators=[orchestra.contrib.mailboxes.validators.validate_emailname], verbose_name='name', blank=True, max_length=64)), + ('forward', models.CharField(help_text='Space separated email addresses or mailboxes', validators=[orchestra.contrib.mailboxes.validators.validate_forward], verbose_name='forward', blank=True, max_length=256)), + ('account', models.ForeignKey(related_name='addresses', to=settings.AUTH_USER_MODEL, verbose_name='Account')), + ('domain', models.ForeignKey(related_name='addresses', to='domains.Domain', verbose_name='domain')), ], options={ 'verbose_name_plural': 'addresses', @@ -31,23 +31,23 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Autoresponse', fields=[ - ('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), - ('subject', models.CharField(max_length=256, verbose_name='subject')), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('subject', models.CharField(verbose_name='subject', max_length=256)), ('message', models.TextField(verbose_name='message')), ('enabled', models.BooleanField(default=False, verbose_name='enabled')), - ('address', models.OneToOneField(related_name='autoresponse', verbose_name='address', to='mailboxes.Address')), + ('address', models.OneToOneField(related_name='autoresponse', to='mailboxes.Address', verbose_name='address')), ], ), migrations.CreateModel( name='Mailbox', fields=[ - ('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), - ('name', models.CharField(validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid mailbox name.')], max_length=64, unique=True, help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', verbose_name='name')), - ('password', models.CharField(max_length=128, verbose_name='password')), - ('filtering', models.CharField(default='REDIRECT', max_length=16, choices=[('DISABLE', 'Disable'), ('CUSTOM', 'Custom filtering'), ('REDIRECT', 'Archive spam'), ('REJECT', 'Reject spam')])), - ('custom_filtering', models.TextField(validators=[orchestra.contrib.mailboxes.validators.validate_sieve], help_text='Arbitrary email filtering in sieve language. This overrides any automatic junk email filtering', verbose_name='filtering', blank=True)), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(unique=True, help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid mailbox name.')], verbose_name='name', max_length=64)), + ('password', models.CharField(verbose_name='password', max_length=128)), + ('filtering', models.CharField(choices=[('REJECT', 'Reject spam (X-Spam-Score≥9)'), ('REDIRECT', 'Archive spam (X-Spam-Score≥9)'), ('DISABLE', 'Disable'), ('CUSTOM', 'Custom filtering')], default='REDIRECT', max_length=16)), + ('custom_filtering', models.TextField(help_text='Arbitrary email filtering in sieve language. This overrides any automatic junk email filtering', validators=[orchestra.contrib.mailboxes.validators.validate_sieve], verbose_name='filtering', blank=True)), ('is_active', models.BooleanField(default=True, verbose_name='active')), - ('account', models.ForeignKey(related_name='mailboxes', verbose_name='account', to=settings.AUTH_USER_MODEL)), + ('account', models.ForeignKey(related_name='mailboxes', to=settings.AUTH_USER_MODEL, verbose_name='account')), ], options={ 'verbose_name_plural': 'mailboxes', @@ -56,7 +56,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='address', name='mailboxes', - field=models.ManyToManyField(related_name='addresses', verbose_name='mailboxes', blank=True, to='mailboxes.Mailbox'), + field=models.ManyToManyField(related_name='addresses', to='mailboxes.Mailbox', verbose_name='mailboxes', blank=True), ), migrations.AlterUniqueTogether( name='address', diff --git a/orchestra/contrib/miscellaneous/migrations/0001_initial.py b/orchestra/contrib/miscellaneous/migrations/0001_initial.py index bd61b3b6..60bef968 100644 --- a/orchestra/contrib/miscellaneous/migrations/0001_initial.py +++ b/orchestra/contrib/miscellaneous/migrations/0001_initial.py @@ -2,9 +2,9 @@ from __future__ import unicode_literals from django.db import models, migrations +import orchestra.models.fields import orchestra.core.validators from django.conf import settings -import orchestra.models.fields class Migration(migrations.Migration): @@ -17,11 +17,11 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Miscellaneous', fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)), - ('identifier', orchestra.models.fields.NullableCharField(max_length=256, unique=True, verbose_name='identifier', null=True, help_text='A unique identifier for this service.')), - ('description', models.TextField(blank=True, verbose_name='description')), - ('amount', models.PositiveIntegerField(default=1, verbose_name='amount')), - ('is_active', models.BooleanField(default=True, help_text='Designates whether this service should be treated as active. Unselect this instead of deleting services.', verbose_name='active')), + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('identifier', orchestra.models.fields.NullableCharField(null=True, verbose_name='identifier', unique=True, help_text='A unique identifier for this service.', max_length=256)), + ('description', models.TextField(verbose_name='description', blank=True)), + ('amount', models.PositiveIntegerField(verbose_name='amount', default=1)), + ('is_active', models.BooleanField(help_text='Designates whether this service should be treated as active. Unselect this instead of deleting services.', verbose_name='active', default=True)), ('account', models.ForeignKey(verbose_name='account', to=settings.AUTH_USER_MODEL, related_name='miscellaneous')), ], options={ @@ -31,13 +31,13 @@ class Migration(migrations.Migration): migrations.CreateModel( name='MiscService', fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)), - ('name', models.CharField(max_length=32, validators=[orchestra.core.validators.validate_name], unique=True, verbose_name='name', help_text='Raw name used for internal referenciation, i.e. service match definition')), - ('verbose_name', models.CharField(blank=True, max_length=256, verbose_name='verbose name', help_text='Human readable name')), - ('description', models.TextField(blank=True, help_text='Optional description', verbose_name='description')), - ('has_identifier', models.BooleanField(default=True, help_text='Designates if this service has a unique text field that identifies it or not.', verbose_name='has identifier')), - ('has_amount', models.BooleanField(default=False, help_text='Designates whether this service has amount property or not.', verbose_name='has amount')), - ('is_active', models.BooleanField(default=True, help_text='Whether new instances of this service can be created or not. Unselect this instead of deleting services.', verbose_name='active')), + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(verbose_name='name', unique=True, validators=[orchestra.core.validators.validate_name], max_length=32, help_text='Raw name used for internal referenciation, i.e. service match definition')), + ('verbose_name', models.CharField(verbose_name='verbose name', max_length=256, blank=True, help_text='Human readable name')), + ('description', models.TextField(verbose_name='description', blank=True, help_text='Optional description')), + ('has_identifier', models.BooleanField(help_text='Designates if this service has a unique text field that identifies it or not.', verbose_name='has identifier', default=True)), + ('has_amount', models.BooleanField(help_text='Designates whether this service has amount property or not.', verbose_name='has amount', default=False)), + ('is_active', models.BooleanField(help_text='Whether new instances of this service can be created or not. Unselect this instead of deleting services.', verbose_name='active', default=True)), ], ), migrations.AddField( diff --git a/orchestra/contrib/orchestration/migrations/0001_initial.py b/orchestra/contrib/orchestration/migrations/0001_initial.py index afa42e94..2e24cc81 100644 --- a/orchestra/contrib/orchestration/migrations/0001_initial.py +++ b/orchestra/contrib/orchestration/migrations/0001_initial.py @@ -15,17 +15,17 @@ class Migration(migrations.Migration): migrations.CreateModel( name='BackendLog', fields=[ - ('id', models.AutoField(primary_key=True, serialize=False, auto_created=True, verbose_name='ID')), - ('backend', models.CharField(verbose_name='backend', max_length=256)), - ('state', models.CharField(choices=[('RECEIVED', 'RECEIVED'), ('TIMEOUT', 'TIMEOUT'), ('STARTED', 'STARTED'), ('SUCCESS', 'SUCCESS'), ('FAILURE', 'FAILURE'), ('ERROR', 'ERROR'), ('REVOKED', 'REVOKED')], verbose_name='state', max_length=16, default='RECEIVED')), + ('id', models.AutoField(primary_key=True, auto_created=True, serialize=False, verbose_name='ID')), + ('backend', models.CharField(max_length=256, verbose_name='backend')), + ('state', models.CharField(choices=[('RECEIVED', 'RECEIVED'), ('TIMEOUT', 'TIMEOUT'), ('STARTED', 'STARTED'), ('SUCCESS', 'SUCCESS'), ('FAILURE', 'FAILURE'), ('ERROR', 'ERROR'), ('ABORTED', 'ABORTED'), ('REVOKED', 'REVOKED')], max_length=16, default='RECEIVED', verbose_name='state')), ('script', models.TextField(verbose_name='script')), ('stdout', models.TextField(verbose_name='stdout')), ('stderr', models.TextField(verbose_name='stdin')), ('traceback', models.TextField(verbose_name='traceback')), ('exit_code', models.IntegerField(null=True, verbose_name='exit code')), - ('task_id', models.CharField(null=True, verbose_name='task ID', unique=True, max_length=36, help_text='Celery task ID when used as execution backend')), - ('created_at', models.DateTimeField(verbose_name='created', auto_now_add=True)), - ('updated_at', models.DateTimeField(verbose_name='updated', auto_now=True)), + ('task_id', models.CharField(null=True, max_length=36, help_text='Celery task ID when used as execution backend', unique=True, verbose_name='task ID')), + ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created')), + ('updated_at', models.DateTimeField(auto_now=True, verbose_name='updated')), ], options={ 'get_latest_by': 'id', @@ -34,35 +34,35 @@ class Migration(migrations.Migration): migrations.CreateModel( name='BackendOperation', fields=[ - ('id', models.AutoField(primary_key=True, serialize=False, auto_created=True, verbose_name='ID')), - ('backend', models.CharField(verbose_name='backend', max_length=256)), - ('action', models.CharField(verbose_name='action', max_length=64)), + ('id', models.AutoField(primary_key=True, auto_created=True, serialize=False, verbose_name='ID')), + ('backend', models.CharField(max_length=256, verbose_name='backend')), + ('action', models.CharField(max_length=64, verbose_name='action')), ('object_id', models.PositiveIntegerField()), ('content_type', models.ForeignKey(to='contenttypes.ContentType')), - ('log', models.ForeignKey(related_name='operations', to='orchestration.BackendLog')), + ('log', models.ForeignKey(to='orchestration.BackendLog', related_name='operations')), ], options={ - 'verbose_name': 'Operation', 'verbose_name_plural': 'Operations', + 'verbose_name': 'Operation', }, ), migrations.CreateModel( name='Route', fields=[ - ('id', models.AutoField(primary_key=True, serialize=False, auto_created=True, verbose_name='ID')), - ('backend', models.CharField(choices=[('Apache2Traffic', '[M] Apache 2 Traffic'), ('DovecotMaildirDisk', '[M] Dovecot Maildir size'), ('Exim4Traffic', '[M] Exim4 traffic'), ('MailmanSubscribers', '[M] Mailman subscribers'), ('MailmanTraffic', '[M] Mailman traffic'), ('MailmanTrafficBash', '[M] Mailman traffic (Bash)'), ('MysqlDisk', '[M] MySQL disk'), ('OpenVZTraffic', '[M] OpenVZTraffic'), ('PostfixMailscannerTraffic', '[M] Postfix-Mailscanner traffic'), ('UNIXUserDisk', '[M] UNIX user disk'), ('VsFTPdTraffic', '[M] VsFTPd traffic'), ('Apache2Backend', '[S] Apache 2'), ('BSCWBackend', '[S] BSCW SaaS'), ('Bind9MasterDomainBackend', '[S] Bind9 master domain'), ('Bind9SlaveDomainBackend', '[S] Bind9 slave domain'), ('DokuWikiMuBackend', '[S] DokuWiki multisite'), ('DovecotPostfixPasswdVirtualUserBackend', '[S] Dovecot-Postfix virtualuser'), ('DrupalMuBackend', '[S] Drupal multisite'), ('GitLabSaaSBackend', '[S] GitLab SaaS'), ('AutoresponseBackend', '[S] Mail autoresponse'), ('MailmanBackend', '[S] Mailman'), ('MySQLBackend', '[S] MySQL database'), ('MySQLUserBackend', '[S] MySQL user'), ('PHPBackend', '[S] PHP FPM/FCGID'), ('PostfixAddressBackend', '[S] Postfix address'), ('StaticBackend', '[S] Static'), ('SymbolicLinkBackend', '[S] Symbolic link webapp'), ('UNIXUserMaildirBackend', '[S] UNIX maildir user'), ('UNIXUserBackend', '[S] UNIX user'), ('WebalizerAppBackend', '[S] Webalizer App'), ('WebalizerBackend', '[S] Webalizer Content'), ('WordPressBackend', '[S] Wordpress'), ('WordpressMuBackend', '[S] Wordpress multisite'), ('WordpressMuBackend', '[S] Wordpress multisite'), ('PhpListSaaSBackend', '[S] phpList SaaS')], verbose_name='backend', max_length=256)), - ('match', models.CharField(blank=True, default='True', verbose_name='match', max_length=256, help_text='Python expression used for selecting the targe host, instance referes to the current object.')), - ('is_active', models.BooleanField(verbose_name='active', default=True)), + ('id', models.AutoField(primary_key=True, auto_created=True, serialize=False, verbose_name='ID')), + ('backend', models.CharField(choices=[('Apache2Traffic', '[M] Apache 2 Traffic'), ('DovecotMaildirDisk', '[M] Dovecot Maildir size'), ('Exim4Traffic', '[M] Exim4 traffic'), ('MailmanSubscribers', '[M] Mailman subscribers'), ('MailmanTraffic', '[M] Mailman traffic'), ('MysqlDisk', '[M] MySQL disk'), ('OpenVZTraffic', '[M] OpenVZTraffic'), ('PostfixMailscannerTraffic', '[M] Postfix-Mailscanner traffic'), ('UNIXUserDisk', '[M] UNIX user disk'), ('VsFTPdTraffic', '[M] VsFTPd traffic'), ('Apache2Backend', '[S] Apache 2'), ('BSCWBackend', '[S] BSCW SaaS'), ('Bind9MasterDomainBackend', '[S] Bind9 master domain'), ('Bind9SlaveDomainBackend', '[S] Bind9 slave domain'), ('DokuWikiMuBackend', '[S] DokuWiki multisite'), ('DovecotPostfixPasswdVirtualUserBackend', '[S] Dovecot-Postfix virtualuser'), ('DrupalMuBackend', '[S] Drupal multisite'), ('GitLabSaaSBackend', '[S] GitLab SaaS'), ('AutoresponseBackend', '[S] Mail autoresponse'), ('MailmanBackend', '[S] Mailman'), ('MySQLBackend', '[S] MySQL database'), ('MySQLUserBackend', '[S] MySQL user'), ('PHPBackend', '[S] PHP FPM/FCGID'), ('PostfixAddressBackend', '[S] Postfix address'), ('uWSGIPythonBackend', '[S] Python uWSGI'), ('StaticBackend', '[S] Static'), ('SymbolicLinkBackend', '[S] Symbolic link webapp'), ('SyncBind9MasterDomainBackend', '[S] Sync Bind9 master domain'), ('SyncBind9SlaveDomainBackend', '[S] Sync Bind9 slave domain'), ('UNIXUserMaildirBackend', '[S] UNIX maildir user'), ('UNIXUserBackend', '[S] UNIX user'), ('WebalizerAppBackend', '[S] Webalizer App'), ('WebalizerBackend', '[S] Webalizer Content'), ('WordPressBackend', '[S] Wordpress'), ('WordpressMuBackend', '[S] Wordpress multisite'), ('PhpListSaaSBackend', '[S] phpList SaaS')], max_length=256, verbose_name='backend')), + ('match', models.CharField(max_length=256, default='True', blank=True, help_text='Python expression used for selecting the targe host, instance referes to the current object.', verbose_name='match')), + ('is_active', models.BooleanField(default=True, verbose_name='active')), ], ), migrations.CreateModel( name='Server', fields=[ - ('id', models.AutoField(primary_key=True, serialize=False, auto_created=True, verbose_name='ID')), - ('name', models.CharField(verbose_name='name', unique=True, max_length=256)), - ('address', orchestra.models.fields.NullableCharField(blank=True, unique=True, help_text='IP address or domain name', null=True, verbose_name='address', max_length=256)), + ('id', models.AutoField(primary_key=True, auto_created=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=256, unique=True, verbose_name='name')), + ('address', orchestra.models.fields.NullableCharField(null=True, help_text='IP address or domain name', verbose_name='address', max_length=256, unique=True, blank=True)), ('description', models.TextField(blank=True, verbose_name='description')), - ('os', models.CharField(choices=[('LINUX', 'Linux')], verbose_name='operative system', max_length=32, default='LINUX')), + ('os', models.CharField(choices=[('LINUX', 'Linux')], max_length=32, default='LINUX', verbose_name='operative system')), ], ), migrations.AddField( @@ -73,7 +73,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='backendlog', name='server', - field=models.ForeignKey(to='orchestration.Server', related_name='execution_logs', verbose_name='server'), + field=models.ForeignKey(verbose_name='server', related_name='execution_logs', to='orchestration.Server'), ), migrations.AlterUniqueTogether( name='route', diff --git a/orchestra/contrib/orders/migrations/0001_initial.py b/orchestra/contrib/orders/migrations/0001_initial.py index 7d8ecefb..06634d80 100644 --- a/orchestra/contrib/orders/migrations/0001_initial.py +++ b/orchestra/contrib/orders/migrations/0001_initial.py @@ -2,25 +2,25 @@ from __future__ import unicode_literals from django.db import models, migrations -import django.utils.timezone from django.conf import settings +import django.utils.timezone class Migration(migrations.Migration): dependencies = [ - ('contenttypes', '0002_remove_content_type_name'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('services', '0001_initial'), + ('contenttypes', '0002_remove_content_type_name'), + ('services', '__first__'), ] operations = [ migrations.CreateModel( name='MetricStorage', fields=[ - ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), - ('value', models.DecimalField(verbose_name='value', decimal_places=2, max_digits=16)), - ('created_on', models.DateField(verbose_name='created', auto_now_add=True)), + ('id', models.AutoField(primary_key=True, verbose_name='ID', serialize=False, auto_created=True)), + ('value', models.DecimalField(max_digits=16, decimal_places=2, verbose_name='value')), + ('created_on', models.DateField(auto_now_add=True, verbose_name='created')), ('updated_on', models.DateTimeField(verbose_name='updated')), ], options={ @@ -30,17 +30,17 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Order', fields=[ - ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), + ('id', models.AutoField(primary_key=True, verbose_name='ID', serialize=False, auto_created=True)), ('object_id', models.PositiveIntegerField(null=True)), - ('registered_on', models.DateField(verbose_name='registered', default=django.utils.timezone.now)), - ('cancelled_on', models.DateField(blank=True, verbose_name='cancelled', null=True)), - ('billed_on', models.DateField(blank=True, verbose_name='billed', null=True)), - ('billed_until', models.DateField(blank=True, verbose_name='billed until', null=True)), - ('ignore', models.BooleanField(verbose_name='ignore', default=False)), + ('registered_on', models.DateField(default=django.utils.timezone.now, verbose_name='registered')), + ('cancelled_on', models.DateField(blank=True, null=True, verbose_name='cancelled')), + ('billed_on', models.DateField(blank=True, null=True, verbose_name='billed')), + ('billed_until', models.DateField(blank=True, null=True, verbose_name='billed until')), + ('ignore', models.BooleanField(default=False, verbose_name='ignore')), ('description', models.TextField(blank=True, verbose_name='description')), - ('account', models.ForeignKey(related_name='orders', verbose_name='account', to=settings.AUTH_USER_MODEL)), + ('account', models.ForeignKey(to=settings.AUTH_USER_MODEL, related_name='orders', verbose_name='account')), ('content_type', models.ForeignKey(to='contenttypes.ContentType')), - ('service', models.ForeignKey(related_name='orders', verbose_name='service', to='services.Service')), + ('service', models.ForeignKey(to='services.Service', related_name='orders', verbose_name='service')), ], options={ 'get_latest_by': 'id', @@ -49,6 +49,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='metricstorage', name='order', - field=models.ForeignKey(related_name='metrics', verbose_name='order', to='orders.Order'), + field=models.ForeignKey(to='orders.Order', related_name='metrics', verbose_name='order'), ), ] diff --git a/orchestra/contrib/payments/migrations/0001_initial.py b/orchestra/contrib/payments/migrations/0001_initial.py new file mode 100644 index 00000000..fa467586 --- /dev/null +++ b/orchestra/contrib/payments/migrations/0001_initial.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import jsonfield.fields +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('bills', '0002_auto_20150429_1343'), + ] + + operations = [ + migrations.CreateModel( + name='PaymentSource', + fields=[ + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), + ('method', models.CharField(verbose_name='method', choices=[('SEPADirectDebit', 'SEPA Direct Debit')], max_length=32)), + ('data', jsonfield.fields.JSONField(verbose_name='data', default={})), + ('is_active', models.BooleanField(verbose_name='active', default=True)), + ('account', models.ForeignKey(related_name='paymentsources', verbose_name='account', to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='Transaction', + fields=[ + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), + ('state', models.CharField(verbose_name='state', choices=[('WAITTING_PROCESSING', 'Waitting processing'), ('WAITTING_EXECUTION', 'Waitting execution'), ('EXECUTED', 'Executed'), ('SECURED', 'Secured'), ('REJECTED', 'Rejected')], max_length=32, default='WAITTING_PROCESSING')), + ('amount', models.DecimalField(verbose_name='amount', max_digits=12, decimal_places=2)), + ('currency', models.CharField(max_length=10, default='Eur')), + ('created_at', models.DateTimeField(verbose_name='created', auto_now_add=True)), + ('modified_at', models.DateTimeField(verbose_name='modified', auto_now=True)), + ('bill', models.ForeignKey(related_name='transactions', verbose_name='bill', to='bills.Bill')), + ], + ), + migrations.CreateModel( + name='TransactionProcess', + fields=[ + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), + ('data', jsonfield.fields.JSONField(verbose_name='data', blank=True)), + ('file', models.FileField(verbose_name='file', blank=True, upload_to='')), + ('state', models.CharField(verbose_name='state', choices=[('CREATED', 'Created'), ('EXECUTED', 'Executed'), ('ABORTED', 'Aborted'), ('COMMITED', 'Commited')], max_length=16, default='CREATED')), + ('created_at', models.DateTimeField(verbose_name='created', auto_now_add=True)), + ('updated_at', models.DateTimeField(verbose_name='updated', auto_now=True)), + ], + options={ + 'verbose_name_plural': 'Transaction processes', + }, + ), + migrations.AddField( + model_name='transaction', + name='process', + field=models.ForeignKey(related_name='transactions', blank=True, null=True, verbose_name='process', to='payments.TransactionProcess'), + ), + migrations.AddField( + model_name='transaction', + name='source', + field=models.ForeignKey(related_name='transactions', blank=True, null=True, verbose_name='source', to='payments.PaymentSource'), + ), + ] diff --git a/orchestra/contrib/payments/migrations/__init__.py b/orchestra/contrib/payments/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/orchestra/contrib/plans/migrations/0001_initial.py b/orchestra/contrib/plans/migrations/0001_initial.py index 6b775e7e..a70c97c2 100644 --- a/orchestra/contrib/plans/migrations/0001_initial.py +++ b/orchestra/contrib/plans/migrations/0001_initial.py @@ -2,23 +2,23 @@ from __future__ import unicode_literals from django.db import models, migrations -import orchestra.core.validators from django.conf import settings +import orchestra.core.validators class Migration(migrations.Migration): dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('services', '__first__'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='ContractedPlan', fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), - ('account', models.ForeignKey(related_name='plans', verbose_name='account', to=settings.AUTH_USER_MODEL)), + ('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')), + ('account', models.ForeignKey(to=settings.AUTH_USER_MODEL, verbose_name='account', related_name='plans')), ], options={ 'verbose_name_plural': 'plans', @@ -27,29 +27,29 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Plan', fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), - ('name', models.CharField(verbose_name='name', unique=True, validators=[orchestra.core.validators.validate_name], max_length=32)), - ('verbose_name', models.CharField(verbose_name='verbose_name', max_length=128, blank=True)), - ('is_active', models.BooleanField(verbose_name='active', default=True, help_text='Designates whether this account should be treated as active. Unselect this instead of deleting accounts.')), - ('is_default', models.BooleanField(verbose_name='default', default=False, help_text='Designates whether this plan is used by default or not.')), - ('is_combinable', models.BooleanField(verbose_name='combinable', default=True, help_text='Designates whether this plan can be combined with other plans or not.')), - ('allow_multiple', models.BooleanField(verbose_name='allow multiple', default=False, help_text='Designates whether this plan allow for multiple contractions.')), + ('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')), + ('name', models.CharField(validators=[orchestra.core.validators.validate_name], unique=True, max_length=32, verbose_name='name')), + ('verbose_name', models.CharField(max_length=128, verbose_name='verbose_name', blank=True)), + ('is_active', models.BooleanField(default=True, help_text='Designates whether this account should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), + ('is_default', models.BooleanField(default=False, help_text='Designates whether this plan is used by default or not.', verbose_name='default')), + ('is_combinable', models.BooleanField(default=True, help_text='Designates whether this plan can be combined with other plans or not.', verbose_name='combinable')), + ('allow_multiple', models.BooleanField(default=False, help_text='Designates whether this plan allow for multiple contractions.', verbose_name='allow multiple')), ], ), migrations.CreateModel( name='Rate', fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), - ('quantity', models.PositiveIntegerField(verbose_name='quantity', null=True, blank=True)), - ('price', models.DecimalField(verbose_name='price', decimal_places=2, max_digits=12)), - ('plan', models.ForeignKey(related_name='rates', verbose_name='plan', to='plans.Plan')), - ('service', models.ForeignKey(related_name='rates', verbose_name='service', to='services.Service')), + ('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')), + ('quantity', models.PositiveIntegerField(null=True, help_text='See rate algorihm help text.', verbose_name='quantity', blank=True)), + ('price', models.DecimalField(max_digits=12, verbose_name='price', decimal_places=2)), + ('plan', models.ForeignKey(to='plans.Plan', verbose_name='plan', related_name='rates')), + ('service', models.ForeignKey(to='services.Service', verbose_name='service', related_name='rates')), ], ), migrations.AddField( model_name='contractedplan', name='plan', - field=models.ForeignKey(related_name='contracts', verbose_name='plan', to='plans.Plan'), + field=models.ForeignKey(to='plans.Plan', verbose_name='plan', related_name='contracts'), ), migrations.AlterUniqueTogether( name='rate', diff --git a/orchestra/contrib/resources/migrations/0001_initial.py b/orchestra/contrib/resources/migrations/0001_initial.py index 8e6677b3..7df024e6 100644 --- a/orchestra/contrib/resources/migrations/0001_initial.py +++ b/orchestra/contrib/resources/migrations/0001_initial.py @@ -2,10 +2,10 @@ from __future__ import unicode_literals from django.db import models, migrations -import orchestra.core.validators +import django.utils.timezone import orchestra.contrib.resources.validators import orchestra.models.fields -import django.utils.timezone +import orchestra.core.validators class Migration(migrations.Migration): @@ -19,46 +19,46 @@ class Migration(migrations.Migration): migrations.CreateModel( name='MonitorData', fields=[ - ('id', models.AutoField(primary_key=True, auto_created=True, verbose_name='ID', serialize=False)), - ('monitor', models.CharField(choices=[('Apache2Traffic', '[M] Apache 2 Traffic'), ('DovecotMaildirDisk', '[M] Dovecot Maildir size'), ('Exim4Traffic', '[M] Exim4 traffic'), ('MailmanSubscribers', '[M] Mailman subscribers'), ('MailmanTraffic', '[M] Mailman traffic'), ('MailmanTrafficBash', '[M] Mailman traffic (Bash)'), ('MysqlDisk', '[M] MySQL disk'), ('OpenVZTraffic', '[M] OpenVZTraffic'), ('PostfixMailscannerTraffic', '[M] Postfix-Mailscanner traffic'), ('UNIXUserDisk', '[M] UNIX user disk'), ('VsFTPdTraffic', '[M] VsFTPd traffic')], verbose_name='monitor', max_length=256)), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('monitor', models.CharField(max_length=256, choices=[('Apache2Traffic', '[M] Apache 2 Traffic'), ('DovecotMaildirDisk', '[M] Dovecot Maildir size'), ('Exim4Traffic', '[M] Exim4 traffic'), ('MailmanSubscribers', '[M] Mailman subscribers'), ('MailmanTraffic', '[M] Mailman traffic'), ('MysqlDisk', '[M] MySQL disk'), ('OpenVZTraffic', '[M] OpenVZTraffic'), ('PostfixMailscannerTraffic', '[M] Postfix-Mailscanner traffic'), ('UNIXUserDisk', '[M] UNIX user disk'), ('VsFTPdTraffic', '[M] VsFTPd traffic')], verbose_name='monitor')), ('object_id', models.PositiveIntegerField(verbose_name='object id')), - ('created_at', models.DateTimeField(verbose_name='created', default=django.utils.timezone.now)), - ('value', models.DecimalField(verbose_name='value', max_digits=16, decimal_places=2)), - ('content_type', models.ForeignKey(verbose_name='content type', to='contenttypes.ContentType')), + ('created_at', models.DateTimeField(default=django.utils.timezone.now, verbose_name='created')), + ('value', models.DecimalField(max_digits=16, decimal_places=2, verbose_name='value')), + ('content_type', models.ForeignKey(to='contenttypes.ContentType', verbose_name='content type')), ], options={ - 'get_latest_by': 'id', 'verbose_name_plural': 'monitor data', + 'get_latest_by': 'id', }, ), migrations.CreateModel( name='Resource', fields=[ - ('id', models.AutoField(primary_key=True, auto_created=True, verbose_name='ID', serialize=False)), - ('name', models.CharField(validators=[orchestra.core.validators.validate_name], verbose_name='name', max_length=32, help_text='Required. 32 characters or fewer. Lowercase letters, digits and hyphen only.')), - ('verbose_name', models.CharField(verbose_name='verbose name', max_length=256)), - ('aggregation', models.CharField(choices=[('last-10-days-avg', 'Last 10 days AVG'), ('last', 'Last value'), ('monthly-avg', 'Monthly AVG'), ('monthly-sum', 'Monthly Sum')], verbose_name='aggregation', max_length=16, help_text='Method used for aggregating this resource monitored data.', default='last-10-days-avg')), - ('on_demand', models.BooleanField(verbose_name='on demand', default=False, help_text='If enabled the resource will not be pre-allocated, but allocated under the application demand')), - ('default_allocation', models.PositiveIntegerField(verbose_name='default allocation', help_text='Default allocation value used when this is not an on demand resource', null=True, blank=True)), - ('unit', models.CharField(verbose_name='unit', max_length=16, help_text='The unit in which this resource is represented. For example GB, KB or subscribers')), - ('scale', models.CharField(validators=[orchestra.contrib.resources.validators.validate_scale], verbose_name='scale', max_length=32, help_text='Scale in which this resource monitoring resoults should be prorcessed to match with unit. e.g. 10**9')), - ('disable_trigger', models.BooleanField(verbose_name='disable trigger', default=False, help_text='Disables monitors exeeded and recovery triggers')), - ('monitors', orchestra.models.fields.MultiSelectField(choices=[('Apache2Traffic', '[M] Apache 2 Traffic'), ('DovecotMaildirDisk', '[M] Dovecot Maildir size'), ('Exim4Traffic', '[M] Exim4 traffic'), ('MailmanSubscribers', '[M] Mailman subscribers'), ('MailmanTraffic', '[M] Mailman traffic'), ('MailmanTrafficBash', '[M] Mailman traffic (Bash)'), ('MysqlDisk', '[M] MySQL disk'), ('OpenVZTraffic', '[M] OpenVZTraffic'), ('PostfixMailscannerTraffic', '[M] Postfix-Mailscanner traffic'), ('UNIXUserDisk', '[M] UNIX user disk'), ('VsFTPdTraffic', '[M] VsFTPd traffic')], verbose_name='monitors', max_length=256, help_text='Monitor backends used for monitoring this resource.', blank=True)), - ('is_active', models.BooleanField(verbose_name='active', default=True)), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(validators=[orchestra.core.validators.validate_name], max_length=32, help_text='Required. 32 characters or fewer. Lowercase letters, digits and hyphen only.', verbose_name='name')), + ('verbose_name', models.CharField(max_length=256, verbose_name='verbose name')), + ('aggregation', models.CharField(max_length=16, help_text='Method used for aggregating this resource monitored data.', choices=[('last-10-days-avg', 'Last 10 days AVG'), ('last', 'Last value'), ('monthly-avg', 'Monthly AVG'), ('monthly-sum', 'Monthly Sum')], default='last-10-days-avg', verbose_name='aggregation')), + ('on_demand', models.BooleanField(help_text='If enabled the resource will not be pre-allocated, but allocated under the application demand', default=False, verbose_name='on demand')), + ('default_allocation', models.PositiveIntegerField(help_text='Default allocation value used when this is not an on demand resource', blank=True, null=True, verbose_name='default allocation')), + ('unit', models.CharField(max_length=16, help_text='The unit in which this resource is represented. For example GB, KB or subscribers', verbose_name='unit')), + ('scale', models.CharField(validators=[orchestra.contrib.resources.validators.validate_scale], max_length=32, help_text='Scale in which this resource monitoring resoults should be prorcessed to match with unit. e.g. 10**9', verbose_name='scale')), + ('disable_trigger', models.BooleanField(help_text='Disables monitors exeeded and recovery triggers', default=False, verbose_name='disable trigger')), + ('monitors', orchestra.models.fields.MultiSelectField(max_length=256, help_text='Monitor backends used for monitoring this resource.', blank=True, choices=[('Apache2Traffic', '[M] Apache 2 Traffic'), ('DovecotMaildirDisk', '[M] Dovecot Maildir size'), ('Exim4Traffic', '[M] Exim4 traffic'), ('MailmanSubscribers', '[M] Mailman subscribers'), ('MailmanTraffic', '[M] Mailman traffic'), ('MysqlDisk', '[M] MySQL disk'), ('OpenVZTraffic', '[M] OpenVZTraffic'), ('PostfixMailscannerTraffic', '[M] Postfix-Mailscanner traffic'), ('UNIXUserDisk', '[M] UNIX user disk'), ('VsFTPdTraffic', '[M] VsFTPd traffic')], verbose_name='monitors')), + ('is_active', models.BooleanField(default=True, verbose_name='active')), ('content_type', models.ForeignKey(to='contenttypes.ContentType', help_text='Model where this resource will be hooked.')), - ('crontab', models.ForeignKey(verbose_name='crontab', null=True, to='djcelery.CrontabSchedule', blank=True, help_text='Crontab for periodic execution. Leave it empty to disable periodic monitoring')), + ('crontab', models.ForeignKey(null=True, verbose_name='crontab', to='djcelery.CrontabSchedule', help_text='Crontab for periodic execution. Leave it empty to disable periodic monitoring', blank=True)), ], ), migrations.CreateModel( name='ResourceData', fields=[ - ('id', models.AutoField(primary_key=True, auto_created=True, verbose_name='ID', serialize=False)), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('object_id', models.PositiveIntegerField(verbose_name='object id')), - ('used', models.DecimalField(editable=False, verbose_name='used', max_digits=16, null=True, decimal_places=3)), - ('updated_at', models.DateTimeField(editable=False, verbose_name='updated', null=True)), - ('allocated', models.DecimalField(decimal_places=2, verbose_name='allocated', max_digits=8, null=True, blank=True)), - ('content_type', models.ForeignKey(verbose_name='content type', to='contenttypes.ContentType')), - ('resource', models.ForeignKey(verbose_name='resource', related_name='dataset', to='resources.Resource')), + ('used', models.DecimalField(max_digits=16, editable=False, decimal_places=3, null=True, verbose_name='used')), + ('updated_at', models.DateTimeField(editable=False, null=True, verbose_name='updated')), + ('allocated', models.DecimalField(max_digits=8, blank=True, decimal_places=2, null=True, verbose_name='allocated')), + ('content_type', models.ForeignKey(to='contenttypes.ContentType', verbose_name='content type')), + ('resource', models.ForeignKey(related_name='dataset', to='resources.Resource', verbose_name='resource')), ], options={ 'verbose_name_plural': 'resource data', @@ -70,6 +70,6 @@ class Migration(migrations.Migration): ), migrations.AlterUniqueTogether( name='resource', - unique_together=set([('verbose_name', 'content_type'), ('name', 'content_type')]), + unique_together=set([('name', 'content_type'), ('verbose_name', 'content_type')]), ), ] diff --git a/orchestra/contrib/saas/migrations/0001_initial.py b/orchestra/contrib/saas/migrations/0001_initial.py index 6df8e2eb..0d542338 100644 --- a/orchestra/contrib/saas/migrations/0001_initial.py +++ b/orchestra/contrib/saas/migrations/0001_initial.py @@ -2,29 +2,29 @@ from __future__ import unicode_literals from django.db import models, migrations -import orchestra.core.validators import jsonfield.fields from django.conf import settings +import orchestra.core.validators class Migration(migrations.Migration): dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('databases', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='SaaS', fields=[ - ('id', models.AutoField(verbose_name='ID', auto_created=True, serialize=False, primary_key=True)), - ('service', models.CharField(verbose_name='service', max_length=32, choices=[('bscw', 'BSCW'), ('DokuWikiService', 'Dowkuwiki'), ('DrupalService', 'Drupal'), ('gitlab', 'GitLab'), ('MoodleService', 'Moodle'), ('seafile', 'SeaFile'), ('WordPressService', 'WordPress'), ('phplist', 'phpList')])), - ('name', models.CharField(help_text='Required. 64 characters or fewer. Letters, digits and ./-/_ only.', max_length=64, validators=[orchestra.core.validators.validate_username], verbose_name='Name')), + ('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), + ('service', models.CharField(max_length=32, verbose_name='service', choices=[('bscw', 'BSCW'), ('DokuWikiService', 'Dowkuwiki'), ('DrupalService', 'Drupal'), ('gitlab', 'GitLab'), ('MoodleService', 'Moodle'), ('seafile', 'SeaFile'), ('WordPressService', 'WordPress'), ('phplist', 'phpList')])), + ('name', models.CharField(help_text='Required. 64 characters or fewer. Letters, digits and ./-/_ only.', max_length=64, verbose_name='Name', validators=[orchestra.core.validators.validate_username])), ('is_active', models.BooleanField(help_text='Designates whether this service should be treated as active. ', verbose_name='active', default=True)), ('data', jsonfield.fields.JSONField(help_text='Extra information dependent of each service.', verbose_name='data', default={})), - ('account', models.ForeignKey(related_name='saas', to=settings.AUTH_USER_MODEL, verbose_name='account')), - ('database', models.ForeignKey(to='databases.Database', null=True, blank=True)), + ('account', models.ForeignKey(verbose_name='account', to=settings.AUTH_USER_MODEL, related_name='saas')), + ('database', models.ForeignKey(null=True, blank=True, to='databases.Database')), ], options={ 'verbose_name': 'SaaS', diff --git a/orchestra/contrib/services/migrations/0001_initial.py b/orchestra/contrib/services/migrations/0001_initial.py index ac35277f..d2978000 100644 --- a/orchestra/contrib/services/migrations/0001_initial.py +++ b/orchestra/contrib/services/migrations/0001_initial.py @@ -14,25 +14,25 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Service', fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', serialize=False, auto_created=True)), - ('description', models.CharField(verbose_name='description', max_length=256, unique=True)), - ('match', models.CharField(verbose_name='match', help_text="Python expression that designates wheter a content_type object is related to this service or not, always evaluates True when left blank. Related instance can be instantiated with instance keyword or content_type.model_name.
 databaseuser.type == 'MYSQL'
 miscellaneous.active and str(miscellaneous.identifier).endswith(('.org', '.net', '.com'))
 contractedplan.plan.name == 'association_fee''
 instance.active", max_length=256, blank=True)), - ('handler_type', models.CharField(verbose_name='handler', help_text='Handler used for processing this Service. A handler enables customized behaviour far beyond what options here allow to.', max_length=256, blank=True, choices=[('', 'Default')])), - ('is_active', models.BooleanField(verbose_name='active', default=True)), - ('ignore_superusers', models.BooleanField(verbose_name='ignore superuser, staff and friend', help_text='Designates whether superuser, staff and friend orders are marked as ignored by default or not.', default=True)), - ('billing_period', models.CharField(verbose_name='billing period', help_text='Renewal period for recurring invoicing.', blank=True, choices=[('', 'One time service'), ('MONTHLY', 'Monthly billing'), ('ANUAL', 'Anual billing')], max_length=16, default='ANUAL')), - ('billing_point', models.CharField(verbose_name='billing point', help_text='Reference point for calculating the renewal date on recurring invoices', max_length=16, default='ON_FIXED_DATE', choices=[('ON_REGISTER', 'Registration date'), ('ON_FIXED_DATE', 'Fixed billing date')])), - ('is_fee', models.BooleanField(verbose_name='fee', help_text='Designates whether this service should be billed as membership fee or not', default=False)), - ('order_description', models.CharField(verbose_name='Order description', help_text="Python expression used for generating the description for the bill lines of this services.
Defaults to '%s: %s' % (handler.description, instance)", max_length=128, blank=True)), - ('ignore_period', models.CharField(verbose_name='ignore period', help_text='Period in which orders will be ignored if cancelled. Useful for designating trial periods', blank=True, choices=[('', 'Never'), ('ONE_DAY', 'One day'), ('TWO_DAYS', 'Two days'), ('TEN_DAYS', 'Ten days'), ('ONE_MONTH', 'One month')], max_length=16, default='TEN_DAYS')), - ('metric', models.CharField(verbose_name='metric', help_text="Python expression used for obtinging the metric value for the pricing rate computation. Number of orders is used when left blank. Related instance can be instantiated with instance keyword or content_type.model_name.
 max((mailbox.resources.disk.allocated or 0) -1, 0)
 miscellaneous.amount
 max((account.resources.traffic.used or 0) - getattr(account.miscellaneous.filter(is_active=True, service__name='traffic-prepay').last(), 'amount', 0), 0)", max_length=256, blank=True)), - ('nominal_price', models.DecimalField(verbose_name='nominal price', max_digits=12, decimal_places=2)), - ('tax', models.PositiveIntegerField(verbose_name='tax', choices=[(0, 'Duty free'), (21, '21%')], default=21)), - ('pricing_period', models.CharField(verbose_name='pricing period', help_text='Time period that is used for computing the rate metric.', blank=True, choices=[('', 'Current value'), ('BILLING_PERIOD', 'Same as billing period'), ('MONTHLY', 'Monthly data'), ('ANUAL', 'Anual data')], max_length=16, default='BILLING_PERIOD')), - ('rate_algorithm', models.CharField(verbose_name='rate algorithm', help_text='Algorithm used to interprete the rating table.
  Step price: All price rates with a lower metric are applied.
  Match price: Only the rate with inmediate inferior metric is applied.', max_length=16, default='STEP_PRICE', choices=[('STEP_PRICE', 'Step price'), ('MATCH_PRICE', 'Match price')])), - ('on_cancel', models.CharField(verbose_name='on cancel', help_text='Defines the cancellation behaviour of this service.', max_length=16, default='DISCOUNT', choices=[('NOTHING', 'Nothing'), ('DISCOUNT', 'Discount'), ('COMPENSATE', 'Compensat'), ('REFUND', 'Refund')])), - ('payment_style', models.CharField(verbose_name='payment style', help_text='Designates whether this service should be paid after consumtion (postpay/on demand) or prepaid.', max_length=16, default='PREPAY', choices=[('PREPAY', 'Prepay'), ('POSTPAY', 'Postpay (on demand)')])), - ('content_type', models.ForeignKey(verbose_name='content type', help_text='Content type of the related service objects.', to='contenttypes.ContentType')), + ('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')), + ('description', models.CharField(unique=True, max_length=256, verbose_name='description')), + ('match', models.CharField(max_length=256, blank=True, help_text="Python expression that designates wheter a content_type object is related to this service or not, always evaluates True when left blank. Related instance can be instantiated with instance keyword or content_type.model_name.
 databaseuser.type == 'MYSQL'
 miscellaneous.active and str(miscellaneous.identifier).endswith(('.org', '.net', '.com'))
 contractedplan.plan.name == 'association_fee''
 instance.active", verbose_name='match')), + ('handler_type', models.CharField(max_length=256, blank=True, help_text='Handler used for processing this Service. A handler enables customized behaviour far beyond what options here allow to.', verbose_name='handler', choices=[('', 'Default')])), + ('is_active', models.BooleanField(default=True, verbose_name='active')), + ('ignore_superusers', models.BooleanField(help_text='Designates whether superuser, staff and friend orders are marked as ignored by default or not.', default=True, verbose_name='ignore superuser, staff and friend')), + ('billing_period', models.CharField(max_length=16, verbose_name='billing period', blank=True, help_text='Renewal period for recurring invoicing.', default='ANUAL', choices=[('', 'One time service'), ('MONTHLY', 'Monthly billing'), ('ANUAL', 'Anual billing')])), + ('billing_point', models.CharField(max_length=16, help_text='Reference point for calculating the renewal date on recurring invoices', verbose_name='billing point', default='ON_FIXED_DATE', choices=[('ON_REGISTER', 'Registration date'), ('ON_FIXED_DATE', 'Fixed billing date')])), + ('is_fee', models.BooleanField(help_text='Designates whether this service should be billed as membership fee or not', default=False, verbose_name='fee')), + ('order_description', models.CharField(max_length=128, blank=True, help_text="Python expression used for generating the description for the bill lines of this services.
Defaults to '%s: %s' % (ugettext(handler.description), instance)", verbose_name='Order description')), + ('ignore_period', models.CharField(max_length=16, verbose_name='ignore period', blank=True, help_text='Period in which orders will be ignored if cancelled. Useful for designating trial periods', default='TEN_DAYS', choices=[('', 'Never'), ('ONE_DAY', 'One day'), ('TWO_DAYS', 'Two days'), ('TEN_DAYS', 'Ten days'), ('ONE_MONTH', 'One month')])), + ('metric', models.CharField(max_length=256, blank=True, help_text="Python expression used for obtinging the metric value for the pricing rate computation. Number of orders is used when left blank. Related instance can be instantiated with instance keyword or content_type.model_name.
 max((mailbox.resources.disk.allocated or 0) -1, 0)
 miscellaneous.amount
 max((account.resources.traffic.used or 0) - getattr(account.miscellaneous.filter(is_active=True, service__name='traffic-prepay').last(), 'amount', 0), 0)", verbose_name='metric')), + ('nominal_price', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='nominal price')), + ('tax', models.PositiveIntegerField(verbose_name='tax', default=21, choices=[(0, 'Duty free'), (21, '21%')])), + ('pricing_period', models.CharField(max_length=16, verbose_name='pricing period', blank=True, help_text='Time period that is used for computing the rate metric.', default='BILLING_PERIOD', choices=[('', 'Current value'), ('BILLING_PERIOD', 'Same as billing period'), ('MONTHLY', 'Monthly data'), ('ANUAL', 'Anual data')])), + ('rate_algorithm', models.CharField(max_length=16, help_text='Algorithm used to interprete the rating table.
  Step price: All rates with a quantity lower than the metric are applied. Nominal price will be used when initial block is missing.
  Match price: Only the rate with a) inmediate inferior metric and b) lower price is applied. Nominal price will be used when initial block is missing.', verbose_name='rate algorithm', default='STEP_PRICE', choices=[('STEP_PRICE', 'Step price'), ('MATCH_PRICE', 'Match price')])), + ('on_cancel', models.CharField(max_length=16, help_text='Defines the cancellation behaviour of this service.', verbose_name='on cancel', default='DISCOUNT', choices=[('NOTHING', 'Nothing'), ('DISCOUNT', 'Discount'), ('COMPENSATE', 'Compensat'), ('REFUND', 'Refund')])), + ('payment_style', models.CharField(max_length=16, help_text='Designates whether this service should be paid after consumtion (postpay/on demand) or prepaid.', verbose_name='payment style', default='PREPAY', choices=[('PREPAY', 'Prepay'), ('POSTPAY', 'Postpay (on demand)')])), + ('content_type', models.ForeignKey(to='contenttypes.ContentType', help_text='Content type of the related service objects.', verbose_name='content type')), ], ), ] diff --git a/orchestra/contrib/systemusers/__init__.py b/orchestra/contrib/systemusers/__init__.py index e69de29b..1fbedd5f 100644 --- a/orchestra/contrib/systemusers/__init__.py +++ b/orchestra/contrib/systemusers/__init__.py @@ -0,0 +1 @@ +default_app_config = 'orchestra.contrib.systemusers.apps.SystemUsersConfig' diff --git a/orchestra/contrib/systemusers/apps.py b/orchestra/contrib/systemusers/apps.py new file mode 100644 index 00000000..b1cca6e6 --- /dev/null +++ b/orchestra/contrib/systemusers/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class SystemUsersConfig(AppConfig): + name = 'orchestra.contrib.systemusers' + verbose_name = "System users" diff --git a/orchestra/contrib/systemusers/migrations/0001_initial.py b/orchestra/contrib/systemusers/migrations/0001_initial.py index 9c06eca9..1caab70f 100644 --- a/orchestra/contrib/systemusers/migrations/0001_initial.py +++ b/orchestra/contrib/systemusers/migrations/0001_initial.py @@ -2,28 +2,28 @@ from __future__ import unicode_literals from django.db import models, migrations -import orchestra.core.validators from django.conf import settings +import orchestra.core.validators class Migration(migrations.Migration): dependencies = [ - ('orders', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='SystemUser', fields=[ - ('id', models.AutoField(primary_key=True, auto_created=True, serialize=False, verbose_name='ID')), - ('username', models.CharField(validators=[orchestra.core.validators.validate_username], unique=True, help_text='Required. 64 characters or fewer. Letters, digits and ./-/_ only.', max_length=32, verbose_name='username')), + ('id', models.AutoField(auto_created=True, verbose_name='ID', primary_key=True, serialize=False)), + ('username', models.CharField(verbose_name='username', help_text='Required. 64 characters or fewer. Letters, digits and ./-/_ only.', validators=[orchestra.core.validators.validate_username], max_length=32, unique=True)), ('password', models.CharField(max_length=128, verbose_name='password')), - ('home', models.CharField(max_length=256, help_text='Starting location when login with this no-shell user.', blank=True, verbose_name='home')), - ('directory', models.CharField(max_length=256, help_text="Optional directory relative to user's home.", blank=True, verbose_name='directory')), - ('shell', models.CharField(default='/dev/null', choices=[('/dev/null', 'No shell, FTP only'), ('/bin/rssh', 'No shell, SFTP/RSYNC only'), ('/bin/bash', '/bin/bash'), ('/bin/sh', '/bin/sh')], max_length=32, verbose_name='shell')), - ('is_active', models.BooleanField(default=True, help_text='Designates whether this account should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), -# ('account', models.ForeignKey(related_name='systemusers', to=settings.AUTH_USER_MODEL, verbose_name='Account')), + ('home', models.CharField(verbose_name='home', help_text='Starting location when login with this no-shell user.', blank=True, max_length=256)), + ('directory', models.CharField(verbose_name='directory', help_text="Optional directory relative to user's home.", blank=True, max_length=256)), + ('shell', models.CharField(verbose_name='shell', choices=[('/dev/null', 'No shell, FTP only'), ('/bin/rssh', 'No shell, SFTP/RSYNC only'), ('/bin/bash', '/bin/bash'), ('/bin/sh', '/bin/sh')], default='/dev/null', max_length=32)), + ('is_active', models.BooleanField(verbose_name='active', help_text='Designates whether this account should be treated as active. Unselect this instead of deleting accounts.', default=True)), + ('account', models.ForeignKey(to=settings.AUTH_USER_MODEL, related_name='systemusers', verbose_name='Account')), ('groups', models.ManyToManyField(help_text='A new group will be created for the user. Which additional groups would you like them to be a member of?', blank=True, to='systemusers.SystemUser')), ], ), diff --git a/orchestra/contrib/systemusers/migrations/0002_systemuser_account.py b/orchestra/contrib/systemusers/migrations/0002_systemuser_account.py deleted file mode 100644 index cf7b9d2d..00000000 --- a/orchestra/contrib/systemusers/migrations/0002_systemuser_account.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import models, migrations -from django.conf import settings - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('systemusers', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='systemuser', - name='account', - field=models.ForeignKey(related_name='systemusers', to=settings.AUTH_USER_MODEL, default=1, verbose_name='Account'), - preserve_default=False, - ), - ] diff --git a/orchestra/contrib/vps/migrations/0001_initial.py b/orchestra/contrib/vps/migrations/0001_initial.py index 4ace7e44..031f0849 100644 --- a/orchestra/contrib/vps/migrations/0001_initial.py +++ b/orchestra/contrib/vps/migrations/0001_initial.py @@ -16,16 +16,16 @@ class Migration(migrations.Migration): migrations.CreateModel( name='VPS', fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, primary_key=True, auto_created=True)), - ('hostname', models.CharField(verbose_name='hostname', max_length=256, validators=[orchestra.core.validators.validate_hostname], unique=True)), - ('type', models.CharField(default='openvz', verbose_name='type', max_length=64, choices=[('openvz', 'OpenVZ container')])), - ('template', models.CharField(default='debian7', verbose_name='template', max_length=64, choices=[('debian7', 'Debian 7 - Wheezy')])), - ('password', models.CharField(verbose_name='password', help_text='root password of this virtual machine', max_length=128)), - ('account', models.ForeignKey(to=settings.AUTH_USER_MODEL, verbose_name='Account', related_name='vpss')), + ('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)), + ('hostname', models.CharField(unique=True, max_length=256, validators=[orchestra.core.validators.validate_hostname], verbose_name='hostname')), + ('type', models.CharField(max_length=64, choices=[('openvz', 'OpenVZ container')], verbose_name='type', default='openvz')), + ('template', models.CharField(max_length=64, choices=[('debian7', 'Debian 7 - Wheezy')], verbose_name='template', default='debian7')), + ('password', models.CharField(max_length=128, help_text='root password of this virtual machine', verbose_name='password')), + ('account', models.ForeignKey(related_name='vpss', to=settings.AUTH_USER_MODEL, verbose_name='Account')), ], options={ - 'verbose_name': 'VPS', 'verbose_name_plural': 'VPSs', + 'verbose_name': 'VPS', }, ), ] diff --git a/orchestra/contrib/webapps/migrations/0001_initial.py b/orchestra/contrib/webapps/migrations/0001_initial.py index 69d09498..1aee932f 100644 --- a/orchestra/contrib/webapps/migrations/0001_initial.py +++ b/orchestra/contrib/webapps/migrations/0001_initial.py @@ -2,9 +2,9 @@ from __future__ import unicode_literals from django.db import models, migrations -import jsonfield.fields -import orchestra.core.validators from django.conf import settings +import orchestra.core.validators +import jsonfield.fields class Migration(migrations.Migration): @@ -17,28 +17,28 @@ class Migration(migrations.Migration): migrations.CreateModel( name='WebApp', fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, verbose_name='ID', serialize=False)), - ('name', models.CharField(validators=[orchestra.core.validators.validate_name], verbose_name='name', max_length=128)), - ('type', models.CharField(verbose_name='type', choices=[('php', 'PHP'), ('static', 'Static'), ('symbolic-link', 'Symbolic link'), ('webalizer', 'Webalizer'), ('wordpress-php', 'WordPress')], max_length=32)), - ('data', jsonfield.fields.JSONField(blank=True, verbose_name='data', help_text='Extra information dependent of each service.', default={})), - ('account', models.ForeignKey(to=settings.AUTH_USER_MODEL, verbose_name='Account', related_name='webapps')), + ('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')), + ('name', models.CharField(max_length=128, validators=[orchestra.core.validators.validate_name], help_text='The app will be installed in %(home)s/webapps/%(app_name)s', verbose_name='name')), + ('type', models.CharField(max_length=32, choices=[('php', 'PHP'), ('python', 'Python'), ('static', 'Static'), ('symbolic-link', 'Symbolic link'), ('webalizer', 'Webalizer'), ('wordpress-php', 'WordPress')], verbose_name='type')), + ('data', jsonfield.fields.JSONField(verbose_name='data', help_text='Extra information dependent of each service.', blank=True, default={})), + ('account', models.ForeignKey(related_name='webapps', to=settings.AUTH_USER_MODEL, verbose_name='Account')), ], options={ - 'verbose_name_plural': 'Web Apps', 'verbose_name': 'Web App', + 'verbose_name_plural': 'Web Apps', }, ), migrations.CreateModel( name='WebAppOption', fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, verbose_name='ID', serialize=False)), - ('name', models.CharField(verbose_name='name', choices=[(None, '-------'), ('FileSystem', [('public-root', 'Public root')]), ('Process', [('timeout', 'Process timeout'), ('processes', 'Number of processes')]), ('PHP', [('enabled_functions', 'Enabled functions'), ('allow_url_include', 'Allow URL include'), ('allow_url_fopen', 'Allow URL fopen'), ('auto_append_file', 'Auto append file'), ('auto_prepend_file', 'Auto prepend file'), ('date.timezone', 'date.timezone'), ('default_socket_timeout', 'Default socket timeout'), ('display_errors', 'Display errors'), ('extension', 'Extension'), ('magic_quotes_gpc', 'Magic quotes GPC'), ('magic_quotes_runtime', 'Magic quotes runtime'), ('magic_quotes_sybase', 'Magic quotes sybase'), ('max_execution_time', 'Max execution time'), ('max_input_time', 'Max input time'), ('max_input_vars', 'Max input vars'), ('memory_limit', 'Memory limit'), ('mysql.connect_timeout', 'Mysql connect timeout'), ('output_buffering', 'Output buffering'), ('register_globals', 'Register globals'), ('post_max_size', 'Post max size'), ('sendmail_path', 'sendmail_path'), ('session.bug_compat_warn', 'session.bug_compat_warn'), ('session.auto_start', 'session.auto_start'), ('safe_mode', 'Safe mode'), ('suhosin.post.max_vars', 'Suhosin POST max vars'), ('suhosin.get.max_vars', 'Suhosin GET max vars'), ('suhosin.request.max_vars', 'Suhosin request max vars'), ('suhosin.session.encrypt', 'suhosin.session.encrypt'), ('suhosin.simulation', 'Suhosin simulation'), ('suhosin.executor.include.whitelist', 'suhosin.executor.include.whitelist'), ('upload_max_filesize', 'upload_max_filesize'), ('zend_extension', 'Zend extension')])], max_length=128)), + ('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')), + ('name', models.CharField(max_length=128, choices=[(None, '-------'), ('FileSystem', [('public-root', 'Public root')]), ('Process', [('timeout', 'Process timeout'), ('processes', 'Number of processes')]), ('PHP', [('enable_functions', 'Enable functions'), ('allow_url_include', 'Allow URL include'), ('allow_url_fopen', 'Allow URL fopen'), ('auto_append_file', 'Auto append file'), ('auto_prepend_file', 'Auto prepend file'), ('date.timezone', 'date.timezone'), ('default_socket_timeout', 'Default socket timeout'), ('display_errors', 'Display errors'), ('extension', 'Extension'), ('magic_quotes_gpc', 'Magic quotes GPC'), ('magic_quotes_runtime', 'Magic quotes runtime'), ('magic_quotes_sybase', 'Magic quotes sybase'), ('max_input_time', 'Max input time'), ('max_input_vars', 'Max input vars'), ('memory_limit', 'Memory limit'), ('mysql.connect_timeout', 'Mysql connect timeout'), ('output_buffering', 'Output buffering'), ('register_globals', 'Register globals'), ('post_max_size', 'Post max size'), ('sendmail_path', 'Sendmail path'), ('session.bug_compat_warn', 'Session bug compat warning'), ('session.auto_start', 'Session auto start'), ('safe_mode', 'Safe mode'), ('suhosin.post.max_vars', 'Suhosin POST max vars'), ('suhosin.get.max_vars', 'Suhosin GET max vars'), ('suhosin.request.max_vars', 'Suhosin request max vars'), ('suhosin.session.encrypt', 'Suhosin session encrypt'), ('suhosin.simulation', 'Suhosin simulation'), ('suhosin.executor.include.whitelist', 'Suhosin executor include whitelist'), ('upload_max_filesize', 'Upload max filesize'), ('zend_extension', 'Zend extension')])], verbose_name='name')), ('value', models.CharField(max_length=256, verbose_name='value')), - ('webapp', models.ForeignKey(to='webapps.WebApp', verbose_name='Web application', related_name='options')), + ('webapp', models.ForeignKey(related_name='options', to='webapps.WebApp', verbose_name='Web application')), ], options={ - 'verbose_name_plural': 'options', 'verbose_name': 'option', + 'verbose_name_plural': 'options', }, ), migrations.AlterUniqueTogether( diff --git a/orchestra/contrib/webapps/migrations/0002_auto_20150427_1052.py b/orchestra/contrib/webapps/migrations/0002_auto_20150427_1052.py deleted file mode 100644 index 8b08a78b..00000000 --- a/orchestra/contrib/webapps/migrations/0002_auto_20150427_1052.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import models, migrations -import orchestra.core.validators - - -class Migration(migrations.Migration): - - dependencies = [ - ('webapps', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='webapp', - name='name', - field=models.CharField(validators=[orchestra.core.validators.validate_name], max_length=128, verbose_name='name', help_text='The app will be installed in %(home)s/webapps/%(app_name)s'), - ), - migrations.AlterField( - model_name='webapp', - name='type', - field=models.CharField(max_length=32, verbose_name='type', choices=[('php', 'PHP'), ('python', 'Python'), ('static', 'Static'), ('symbolic-link', 'Symbolic link'), ('webalizer', 'Webalizer'), ('wordpress-php', 'WordPress')]), - ), - migrations.AlterField( - model_name='webappoption', - name='name', - field=models.CharField(max_length=128, verbose_name='name', choices=[(None, '-------'), ('FileSystem', [('public-root', 'Public root')]), ('Process', [('timeout', 'Process timeout'), ('processes', 'Number of processes')]), ('PHP', [('enable_functions', 'Enable functions'), ('allow_url_include', 'Allow URL include'), ('allow_url_fopen', 'Allow URL fopen'), ('auto_append_file', 'Auto append file'), ('auto_prepend_file', 'Auto prepend file'), ('date.timezone', 'date.timezone'), ('default_socket_timeout', 'Default socket timeout'), ('display_errors', 'Display errors'), ('extension', 'Extension'), ('magic_quotes_gpc', 'Magic quotes GPC'), ('magic_quotes_runtime', 'Magic quotes runtime'), ('magic_quotes_sybase', 'Magic quotes sybase'), ('max_input_time', 'Max input time'), ('max_input_vars', 'Max input vars'), ('memory_limit', 'Memory limit'), ('mysql.connect_timeout', 'Mysql connect timeout'), ('output_buffering', 'Output buffering'), ('register_globals', 'Register globals'), ('post_max_size', 'Post max size'), ('sendmail_path', 'Sendmail path'), ('session.bug_compat_warn', 'Session bug compat warning'), ('session.auto_start', 'Session auto start'), ('safe_mode', 'Safe mode'), ('suhosin.post.max_vars', 'Suhosin POST max vars'), ('suhosin.get.max_vars', 'Suhosin GET max vars'), ('suhosin.request.max_vars', 'Suhosin request max vars'), ('suhosin.session.encrypt', 'Suhosin session encrypt'), ('suhosin.simulation', 'Suhosin simulation'), ('suhosin.executor.include.whitelist', 'Suhosin executor include whitelist'), ('upload_max_filesize', 'Upload max filesize'), ('zend_extension', 'Zend extension')])]), - ), - ] diff --git a/orchestra/contrib/websites/migrations/0001_initial.py b/orchestra/contrib/websites/migrations/0001_initial.py index 160a759c..c018dbfd 100644 --- a/orchestra/contrib/websites/migrations/0001_initial.py +++ b/orchestra/contrib/websites/migrations/0001_initial.py @@ -9,8 +9,8 @@ from django.conf import settings class Migration(migrations.Migration): dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('webapps', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('domains', '0001_initial'), ] @@ -19,35 +19,35 @@ class Migration(migrations.Migration): name='Content', fields=[ ('id', models.AutoField(verbose_name='ID', auto_created=True, serialize=False, primary_key=True)), - ('path', models.CharField(verbose_name='path', blank=True, max_length=256, validators=[orchestra.core.validators.validate_url_path])), - ('webapp', models.ForeignKey(to='webapps.WebApp', verbose_name='web application')), + ('path', models.CharField(verbose_name='path', validators=[orchestra.core.validators.validate_url_path], blank=True, max_length=256)), + ('webapp', models.ForeignKey(verbose_name='web application', to='webapps.WebApp')), ], ), migrations.CreateModel( name='Website', fields=[ ('id', models.AutoField(verbose_name='ID', auto_created=True, serialize=False, primary_key=True)), - ('name', models.CharField(verbose_name='name', max_length=128, validators=[orchestra.core.validators.validate_name])), - ('protocol', models.CharField(default='http', verbose_name='protocol', max_length=16, help_text='Select the protocol(s) for this website
HTTPS only performs a redirection from http to https.', choices=[('http', 'HTTP'), ('https', 'HTTPS'), ('http/https', 'HTTP and HTTPS'), ('https-only', 'HTTPS only')])), + ('name', models.CharField(verbose_name='name', validators=[orchestra.core.validators.validate_name], max_length=128)), + ('protocol', models.CharField(verbose_name='protocol', default='http', choices=[('http', 'HTTP'), ('https', 'HTTPS'), ('http/https', 'HTTP and HTTPS'), ('https-only', 'HTTPS only')], help_text='Select the protocol(s) for this website
HTTPS only performs a redirection from http to https.', max_length=16)), ('is_active', models.BooleanField(verbose_name='active', default=True)), - ('account', models.ForeignKey(to=settings.AUTH_USER_MODEL, related_name='websites', verbose_name='Account')), + ('account', models.ForeignKey(verbose_name='Account', related_name='websites', to=settings.AUTH_USER_MODEL)), ('contents', models.ManyToManyField(to='webapps.WebApp', through='websites.Content')), - ('domains', models.ManyToManyField(to='domains.Domain', verbose_name='domains', related_name='websites')), + ('domains', models.ManyToManyField(verbose_name='domains', to='domains.Domain', related_name='websites')), ], ), migrations.CreateModel( name='WebsiteDirective', fields=[ ('id', models.AutoField(verbose_name='ID', auto_created=True, serialize=False, primary_key=True)), - ('name', models.CharField(verbose_name='name', max_length=128, choices=[(None, '-------'), ('SaaS', [('wordpress-saas', 'WordPress SaaS'), ('dokuwiki-saas', 'DokuWiki SaaS'), ('drupal-saas', 'Drupdal SaaS')]), ('ModSecurity', [('sec-rule-remove', 'SecRuleRemoveById'), ('sec-engine', 'SecRuleEngine Off')]), ('HTTPD', [('redirect', 'Redirection'), ('proxy', 'Proxy'), ('error-document', 'ErrorDocumentRoot')]), ('SSL', [('ssl-ca', 'SSL CA'), ('ssl-cert', 'SSL cert'), ('ssl-key', 'SSL key')])])), + ('name', models.CharField(verbose_name='name', choices=[(None, '-------'), ('ModSecurity', [('sec-rule-remove', 'SecRuleRemoveById'), ('sec-engine', 'SecRuleEngine Off')]), ('SSL', [('ssl-ca', 'SSL CA'), ('ssl-cert', 'SSL cert'), ('ssl-key', 'SSL key')]), ('HTTPD', [('redirect', 'Redirection'), ('proxy', 'Proxy'), ('error-document', 'ErrorDocumentRoot')]), ('SaaS', [('wordpress-saas', 'WordPress SaaS'), ('dokuwiki-saas', 'DokuWiki SaaS'), ('drupal-saas', 'Drupdal SaaS')])], max_length=128)), ('value', models.CharField(verbose_name='value', max_length=256)), - ('website', models.ForeignKey(to='websites.Website', related_name='directives', verbose_name='web site')), + ('website', models.ForeignKey(verbose_name='web site', related_name='directives', to='websites.Website')), ], ), migrations.AddField( model_name='content', name='website', - field=models.ForeignKey(to='websites.Website', verbose_name='web site'), + field=models.ForeignKey(verbose_name='web site', to='websites.Website'), ), migrations.AlterUniqueTogether( name='website',