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

37 lines
8.0 KiB
Python
Raw Normal View History

2015-04-29 13:55:22 +00:00
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.core.validators
import django.db.models.deletion
2015-04-29 14:32:38 +00:00
import orchestra.contrib.contacts.validators
2015-04-29 13:55:22 +00:00
import orchestra.models.fields
2015-04-29 14:32:38 +00:00
from django.conf import settings
2015-04-29 13:55:22 +00:00
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Contact',
fields=[
2015-04-29 14:32:38 +00:00
('id', models.AutoField(primary_key=True, serialize=False, auto_created=True, verbose_name='ID')),
2015-04-29 13:55:22 +00:00
('short_name', models.CharField(max_length=128, verbose_name='short name')),
2015-04-29 14:32:38 +00:00
('full_name', models.CharField(max_length=256, verbose_name='full name', blank=True)),
2015-04-29 13:55:22 +00:00
('email', models.EmailField(max_length=254)),
2015-04-29 14:32:38 +00:00
('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 M
('account', models.ForeignKey(null=True, related_name='contacts', on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='Account')),
2015-04-29 13:55:22 +00:00
],
),
]