PageRenderTime 141ms CodeModel.GetById 46ms RepoModel.GetById 1ms app.codeStats 0ms

/chhotu/accounts/migrations/0001_initial.py

https://gitlab.com/rmishra7/chhout.web.backend
Python | 85 lines | 77 code | 6 blank | 2 comment | 0 complexity | abcf3d94c5fb886f4be7c2e7ba6ffe42 MD5 | raw file
  1. # -*- coding: utf-8 -*-
  2. # Generated by Django 1.10 on 2016-09-27 18:56
  3. from __future__ import unicode_literals
  4. import accounts.models
  5. from django.conf import settings
  6. import django.core.validators
  7. from django.db import migrations, models
  8. import django.db.models.deletion
  9. import uuid
  10. class Migration(migrations.Migration):
  11. initial = True
  12. dependencies = [
  13. ('auth', '0008_alter_user_username_max_length'),
  14. ]
  15. operations = [
  16. migrations.CreateModel(
  17. name='Profile',
  18. fields=[
  19. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  20. ('password', models.CharField(max_length=128, verbose_name='password')),
  21. ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
  22. ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
  23. ('name', models.CharField(max_length=120, verbose_name='Your Name')),
  24. ('email', models.EmailField(max_length=70, unique=True, verbose_name='Email')),
  25. ('username', models.CharField(max_length=32, unique=True, verbose_name='Profilename')),
  26. ('contact_no', models.CharField(max_length=15, validators=[django.core.validators.RegexValidator('^\\s*(?:\\+?(\\d{1,3}))?[-. (]*(\\d{3})[-. )]*(\\d{3})[-. ]*(\\d{4})(?: *x(\\d+))?\\s*$'), django.core.validators.MinLengthValidator(6), django.core.validators.MaxLengthValidator(15)], verbose_name='Contact Number')),
  27. ('image', models.FileField(default='user-default.png', upload_to=accounts.models.user_image_upload, verbose_name='Image')),
  28. ('about', models.TextField(blank=True, null=True, verbose_name='About')),
  29. ('facebook_profiile', models.URLField(blank=True, null=True, verbose_name='Facebook Profile')),
  30. ('twitter_profile', models.URLField(blank=True, null=True, verbose_name='Twitter Profile')),
  31. ('role', models.CharField(choices=[('1', 'Admin'), ('2', 'Customer/User'), ('3', 'Delivery Boy')], default=2, max_length=1, verbose_name='Profile Role')),
  32. ('email_alerts', models.BooleanField(default=False, verbose_name='Email Alerts')),
  33. ('sms_alerts', models.BooleanField(default=False, verbose_name='SMS Alerts')),
  34. ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='Staff Status')),
  35. ('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')),
  36. ('date_joined', models.DateTimeField(auto_now_add=True, verbose_name='Date Joined')),
  37. ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, verbose_name='Profile Unique ID')),
  38. ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created On')),
  39. ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated On')),
  40. ('delete', models.BooleanField(default=False, verbose_name='Delete')),
  41. ('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')),
  42. ('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')),
  43. ],
  44. options={
  45. 'verbose_name': 'Profile',
  46. 'verbose_name_plural': 'Profiles',
  47. },
  48. ),
  49. migrations.CreateModel(
  50. name='PasswordReset',
  51. fields=[
  52. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  53. ('activation_key', models.CharField(max_length=100, verbose_name='activation_key')),
  54. ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='user')),
  55. ],
  56. options={
  57. 'verbose_name': 'PasswordReset',
  58. 'verbose_name_plural': 'PasswordResets',
  59. },
  60. ),
  61. migrations.CreateModel(
  62. name='UserAddress',
  63. fields=[
  64. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  65. ('address', models.TextField(verbose_name='Address')),
  66. ('landmark', models.CharField(blank=True, max_length=200, null=True, verbose_name='landmark')),
  67. ('city', models.CharField(default='Gurgaon', max_length=40, verbose_name='City')),
  68. ('state', models.CharField(default='Haryana', max_length=40, verbose_name='State')),
  69. ('country', models.CharField(default='IN', max_length=40, verbose_name='Country')),
  70. ('zipcode', models.IntegerField(default=122001, verbose_name='Zip Code')),
  71. ('delete', models.BooleanField(default=False, verbose_name='Delete')),
  72. ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='useraddress', to=settings.AUTH_USER_MODEL)),
  73. ],
  74. options={
  75. 'verbose_name': 'UserAddress',
  76. 'verbose_name_plural': 'UserAddresses',
  77. },
  78. ),
  79. ]