/contacts/migrations/0001_initial.py

https://gitlab.com/fnaticshank/drf · Python · 49 lines · 41 code · 6 blank · 2 comment · 0 complexity · ed22a4e2d1ff10a528487c2d07827e5c MD5 · raw file

  1. # -*- coding: utf-8 -*-
  2. # Generated by Django 1.9.8 on 2016-07-26 21:07
  3. from __future__ import unicode_literals
  4. import django.contrib.auth.models
  5. import django.core.validators
  6. from django.db import migrations, models
  7. import django.utils.timezone
  8. class Migration(migrations.Migration):
  9. initial = True
  10. dependencies = [
  11. ('auth', '0007_alter_validators_add_error_messages'),
  12. ]
  13. operations = [
  14. migrations.CreateModel(
  15. name='Contact',
  16. fields=[
  17. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  18. ('password', models.CharField(max_length=128, verbose_name='password')),
  19. ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
  20. ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
  21. ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=30, unique=True, validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.')], verbose_name='username')),
  22. ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
  23. ('last_name', models.CharField(blank=True, max_length=30, verbose_name='last name')),
  24. ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
  25. ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
  26. ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
  27. ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
  28. ('name', models.CharField(default=b'', max_length=256)),
  29. ('phone', models.CharField(db_index=True, max_length=32, unique=True)),
  30. ('city', models.CharField(default=b'', max_length=100)),
  31. ('company', models.CharField(default=b'', max_length=100)),
  32. ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
  33. ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
  34. ],
  35. options={
  36. 'verbose_name': 'user',
  37. 'verbose_name_plural': 'users',
  38. },
  39. managers=[
  40. ('objects', django.contrib.auth.models.UserManager()),
  41. ],
  42. ),
  43. ]