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

36 lines
7.9 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 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', 'Ira
('account', models.ForeignKey(null=True, related_name='contacts', to=settings.AUTH_USER_MODEL, verbose_name='Account')),
],
),
]