/chhotu/accounts/migrations/0001_initial.py
Python | 85 lines | 77 code | 6 blank | 2 comment | 0 complexity | abcf3d94c5fb886f4be7c2e7ba6ffe42 MD5 | raw file
- # -*- coding: utf-8 -*-
- # Generated by Django 1.10 on 2016-09-27 18:56
- from __future__ import unicode_literals
- import accounts.models
- from django.conf import settings
- import django.core.validators
- from django.db import migrations, models
- import django.db.models.deletion
- import uuid
- class Migration(migrations.Migration):
- initial = True
- dependencies = [
- ('auth', '0008_alter_user_username_max_length'),
- ]
- operations = [
- migrations.CreateModel(
- name='Profile',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('password', models.CharField(max_length=128, verbose_name='password')),
- ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
- ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
- ('name', models.CharField(max_length=120, verbose_name='Your Name')),
- ('email', models.EmailField(max_length=70, unique=True, verbose_name='Email')),
- ('username', models.CharField(max_length=32, unique=True, verbose_name='Profilename')),
- ('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')),
- ('image', models.FileField(default='user-default.png', upload_to=accounts.models.user_image_upload, verbose_name='Image')),
- ('about', models.TextField(blank=True, null=True, verbose_name='About')),
- ('facebook_profiile', models.URLField(blank=True, null=True, verbose_name='Facebook Profile')),
- ('twitter_profile', models.URLField(blank=True, null=True, verbose_name='Twitter Profile')),
- ('role', models.CharField(choices=[('1', 'Admin'), ('2', 'Customer/User'), ('3', 'Delivery Boy')], default=2, max_length=1, verbose_name='Profile Role')),
- ('email_alerts', models.BooleanField(default=False, verbose_name='Email Alerts')),
- ('sms_alerts', models.BooleanField(default=False, verbose_name='SMS Alerts')),
- ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='Staff Status')),
- ('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')),
- ('date_joined', models.DateTimeField(auto_now_add=True, verbose_name='Date Joined')),
- ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, verbose_name='Profile Unique ID')),
- ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created On')),
- ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated On')),
- ('delete', models.BooleanField(default=False, verbose_name='Delete')),
- ('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')),
- ('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')),
- ],
- options={
- 'verbose_name': 'Profile',
- 'verbose_name_plural': 'Profiles',
- },
- ),
- migrations.CreateModel(
- name='PasswordReset',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('activation_key', models.CharField(max_length=100, verbose_name='activation_key')),
- ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='user')),
- ],
- options={
- 'verbose_name': 'PasswordReset',
- 'verbose_name_plural': 'PasswordResets',
- },
- ),
- migrations.CreateModel(
- name='UserAddress',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('address', models.TextField(verbose_name='Address')),
- ('landmark', models.CharField(blank=True, max_length=200, null=True, verbose_name='landmark')),
- ('city', models.CharField(default='Gurgaon', max_length=40, verbose_name='City')),
- ('state', models.CharField(default='Haryana', max_length=40, verbose_name='State')),
- ('country', models.CharField(default='IN', max_length=40, verbose_name='Country')),
- ('zipcode', models.IntegerField(default=122001, verbose_name='Zip Code')),
- ('delete', models.BooleanField(default=False, verbose_name='Delete')),
- ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='useraddress', to=settings.AUTH_USER_MODEL)),
- ],
- options={
- 'verbose_name': 'UserAddress',
- 'verbose_name_plural': 'UserAddresses',
- },
- ),
- ]