django-orchestra-test/orchestra/contrib/contacts/migrations/0001_initial.py

37 lines
8.0 KiB
Python

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.core.validators
import django.db.models.deletion
import orchestra.contrib.contacts.validators
import orchestra.models.fields
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Contact',
fields=[
('id', models.AutoField(primary_key=True, serialize=False, auto_created=True, verbose_name='ID')),
('short_name', models.CharField(max_length=128, verbose_name='short name')),
('full_name', models.CharField(max_length=256, verbose_name='full name', blank=True)),
('email', models.EmailField(max_length=254)),
('email_usage', orchestra.models.fields.MultiSelectField(choices=[('SUPPORT', 'Support tickets'), ('ADMIN', 'Administrative'), ('BILLING', 'Billing'), ('TECH', 'Technical'), ('ADDS', 'Announcements'), ('EMERGENCY', 'Emergency contact')], max_length=256, default=('SUPPORT', 'ADMIN', 'BILLING', 'TECH', 'ADDS', 'EMERGENCY'), verbose_name='email usage', blank=True)),
('phone', models.CharField(max_length=32, blank=True, validators=[orchestra.contrib.contacts.validators.validate_phone], verbose_name='phone')),
('phone2', models.CharField(max_length=32, blank=True, validators=[orchestra.contrib.contacts.validators.validate_phone], verbose_name='alternative phone')),
('address', models.TextField(verbose_name='address', blank=True)),
('city', models.CharField(max_length=128, verbose_name='city', blank=True)),
('zipcode', models.CharField(max_length=10, blank=True, validators=[django.core.validators.RegexValidator('^[0-9,A-Z]{3,10}$', 'Enter a valid zipcode.', 'invalid')], verbose_name='zip code')),
('country', models.CharField(choices=[('VC', 'Saint Vincent and the Grenadines'), ('TM', 'Turkmenistan'), ('CL', 'Chile'), ('BN', 'Brunei Darussalam'), ('IS', 'Iceland'), ('AM', 'Armenia'), ('FI', 'Finland'), ('TK', 'Tokelau'), ('AF', 'Afghanistan'), ('IE', 'Ireland'), ('CW', 'Curaçao'), ('PY', 'Paraguay'), ('WF', 'Wallis and Futuna'), ('PK', 'Pakistan'), ('JP', 'Japan'), ('AO', 'Angola'), ('FM', 'Micronesia (Federated States of)'), ('SH', 'Saint Helena, Ascension and Tristan da Cunha'), ('SG', 'Singapore'), ('BL', 'Saint Barthélemy'), ('MK', 'Macedonia (the former Yugoslav Republic of)'), ('MY', 'Malaysia'), ('IM', 'Isle of Man'), ('GW', 'Guinea-Bissau'), ('IQ', 'Iraq'), ('GR', 'Greece'), ('VA', 'Holy See'), ('RW', 'Rwanda'), ('GD', 'Grenada'), ('TZ', 'Tanzania, United Republic of'), ('DZ', 'Algeria'), ('BF', 'Burkina Faso'), ('HU', 'Hungary'), ('TT', 'Trinidad and Tobago'), ('LU', 'Luxembourg'), ('BA', 'Bosnia and Herzegovina'), ('ET', 'Ethiopia'), ('TG', 'Togo'), ('RU', 'Russian Federation'), ('EG', 'Egypt'), ('RO', 'Romania'), ('SR', 'Suriname'), ('GB', 'United Kingdom of Great Britain and Northern Ireland'), ('JM', 'Jamaica'), ('HK', 'Hong Kong'), ('BH', 'Bahrain'), ('KM', 'Comoros'), ('HN', 'Honduras'), ('TD', 'Chad'), ('RS', 'Serbia'), ('PH', 'Philippines'), ('PE', 'Peru'), ('UA', 'Ukraine'), ('AE', 'United Arab Emirates'), ('KW', 'Kuwait'), ('GE', 'Georgia'), ('NA', 'Namibia'), ('CZ', 'Czech Republic'), ('CY', 'Cyprus'), ('LA', "Lao People's Democratic Republic"), ('BZ', 'Belize'), ('MX', 'Mexico'), ('MZ', 'Mozambique'), ('FR', 'France'), ('KG', 'Kyrgyzstan'), ('PW', 'Palau'), ('MG', 'Madagascar'), ('AU', 'Australia'), ('AI', 'Anguilla'), ('UZ', 'Uzbekistan'), ('NL', 'Netherlands'), ('VI', 'Virgin Islands (U.S.)'), ('LT', 'Lithuania'), ('WS', 'Samoa'), ('PA', 'Panama'), ('CO', 'Colombia'), ('AL', 'Albania'), ('PN', 'Pitcairn'), ('SC', 'Seychelles'), ('CH', 'Switzerland'), ('DO', 'Dominican Republic'), ('AW', 'Aruba'), ('GH', 'Ghana'), ('MM', 'Myanmar'), ('ML', 'Mali'), ('PS', 'Palestine, State of'), ('UY', 'Uruguay'), ('MN', 'Mongolia'), ('NE', 'Niger'), ('FK', 'Falkland Islands [Malvinas]'), ('US', 'United States of America'), ('BD', 'Bangladesh'), ('SB', 'Solomon Islands'), ('ZA', 'South Africa'), ('SJ', 'Svalbard and Jan Mayen'), ('IT', 'Italy'), ('HT', 'Haiti'), ('BW', 'Botswana'), ('MA', 'Morocco'), ('GP', 'Guadeloupe'), ('NI', 'Nicaragua'), ('CU', 'Cuba'), ('GL', 'Greenland'), ('MQ', 'Martinique'), ('NZ', 'New Zealand'), ('DE', 'Germany'), ('GY', 'Guyana'), ('YT', 'Mayotte'), ('MR', 'Mauritania'), ('IR', 'Iran (Islamic Republic of)'), ('SL', 'Sierra Leone'), ('MD', 'Moldova (the Republic of)'), ('SM', 'San Marino'), ('SS', 'South Sudan'), ('DM', 'Dominica'), ('NG', 'Nigeria'), ('UM', 'United States Minor Outlying Islands'), ('BI', 'Burundi'), ('GU', 'Guam'), ('GQ', 'Equatorial Guinea'), ('UG', 'Uganda'), ('VU', 'Vanuatu'), ('GT', 'Guatemala'), ('TR', 'Turkey'), ('BO', 'Bolivia (Plurinational State of)'), ('MP', 'Northern Mariana Islands'), ('AQ', 'Antarctica'), ('BS', 'Bahamas'), ('SK', 'Slovakia'), ('BY', 'Belarus'), ('AR', 'Argentina'), ('QA', 'Qatar'), ('LV', 'Latvia'), ('EH', 'Western Sahara'), ('LK', 'Sri Lanka'), ('LB', 'Lebanon'), ('JE', 'Jersey'), ('DJ', 'Djibouti'), ('LC', 'Saint Lucia'), ('CF', 'Central African Republic'), ('KE', 'Kenya'), ('NF', 'Norfolk Island'), ('FO', 'Faroe Islands'), ('BQ', 'Bonaire, Sint Eustatius and Saba'), ('TF', 'French Southern Territories'), ('TC', 'Turks and Caicos Islands'), ('GM', 'Gambia'), ('PF', 'French Polynesia'), ('DK', 'Denmark'), ('GI', 'Gibraltar'), ('SN', 'Senegal'), ('ER', 'Eritrea'), ('CR', 'Costa Rica'), ('AZ', 'Azerbaijan'), ('BR', 'Brazil'), ('SE', 'Sweden'), ('SI', 'Slovenia'), ('SV', 'El Salvador'), ('TO', 'Tonga'), ('LR', 'Liberia'), ('CV', 'Cabo Verde'), ('OM', 'Oman'), ('KR', 'Korea (the Republic of)'), ('BV', 'Bouvet Island'), ('CA', 'Canada'), ('CK', 'Cook Islands'), ('BG', 'Bulgaria'), ('ZW', 'Zimbabwe'), ('FJ', 'Fiji'), ('NU', 'Niue'), ('YE', 'Yemen'), ('CM', 'Cameroon'), ('ZM', 'Zambia'), ('MC', 'Monaco'), ('SX', 'Sint Maarten (Dutch part)'), ('VG', 'Virgin Islands (British)'), ('AD', 'Andorra'), ('MF', 'Saint Martin (French part)'), ('PM', 'Saint Pierre and Miquelon'), ('RE', 'Réunion'), ('SO', 'Somalia'), ('AG', 'Antigua and Barbuda'), ('MH', 'Marshall Islands'), ('TW', 'Taiwan (Province of China)'), ('EE', 'Estonia'), ('NP', 'Nepal'), ('TV', 'Tuvalu'), ('NC', 'New Caledonia'), ('ME', 'Montenegro'), ('CX', 'Christmas Island'), ('LY', 'Libya'), ('KP', "Korea (the Democratic People's Republic of)"), ('SD', 'Sudan'), ('VE', 'Venezuela (Bolivarian Republic of)'), ('KZ', 'Kazakhstan'), ('MV', 'Maldives'), ('CI', "Côte d'Ivoire"), ('VN', 'Viet Nam'), ('IN', 'India'), ('GN', 'Guinea'), ('AX', 'Åland Islands'), ('ST', 'Sao Tome and Principe'), ('HR', 'Croatia'), ('HM', 'Heard Island and McDonald Islands'), ('MO', 'Macao'), ('MS', 'Montserrat'), ('AT', 'Austria'), ('NO', 'Norway'), ('BT', 'Bhutan'), ('PT', 'Portugal'), ('IO', 'British Indian Ocean Territory'), ('KN', 'Saint Kitts and Nevis'), ('PL', 'Poland'), ('MW', 'Malawi'), ('LS', 'Lesotho'), ('SZ', 'Swaziland'), ('TJ', 'Tajikistan'), ('NR', 'Nauru'), ('MT', 'Malta'), ('ES', 'Spain'), ('BB', 'Barbados'), ('CG', 'Congo'), ('PG', 'Papua New Guinea'), ('GS', 'South Georgia and the South Sandwich Islands'), ('TN', 'Tunisia'), ('MU', 'Mauritius'), ('TH', 'Thailand'), ('BJ', 'Benin'), ('KY', 'Cayman Islands'), ('ID', 'Indonesia'), ('CD', 'Congo (the Democratic Republic of the)'), ('KI', 'Kiribati'), ('IL', 'Israel'), ('CN', 'China'), ('SA', 'Saudi Arabia'), ('AS', 'American Samoa'), ('KH', 'Cambodia'), ('JO', 'Jordan'), ('SY', 'Syrian Arab Republic'), ('LI', 'Liechtenstein'), ('GF', 'French Guiana'), ('EC', 'Ecuador'), ('CC', 'Cocos (Keeling) Islands'), ('TL', 'Timor-Leste'), ('BE', 'Belgium'), ('PR', 'Puerto Rico'), ('GA', 'Gabon'), ('BM', 'Bermuda'), ('GG', 'Guernsey')], max_length=20, default='ES', verbose_name='country', blank=True)),
('account', models.ForeignKey(null=True, related_name='contacts', on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='Account')),
],
),
]