/asg/users/migrations/0001_initial.py
https://gitlab.com/lburdzy/asg · Python · 44 lines · 38 code · 5 blank · 1 comment · 0 complexity · 3a440f0b687b71db1c2cf4495f75c450 MD5 · raw file
- # -*- coding: utf-8 -*-
- from __future__ import unicode_literals
- from django.db import migrations, models
- import django.utils.timezone
- import django.core.validators
- import django.contrib.auth.models
- class Migration(migrations.Migration):
- dependencies = [
- ('auth', '0006_require_contenttypes_0002'),
- ]
- operations = [
- migrations.CreateModel(
- name='User',
- fields=[
- ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
- ('password', models.CharField(verbose_name='password', max_length=128)),
- ('last_login', models.DateTimeField(blank=True, verbose_name='last login', null=True)),
- ('is_superuser', models.BooleanField(default=False, verbose_name='superuser status', help_text='Designates that this user has all permissions without explicitly assigning them.')),
- ('username', models.CharField(validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.', 'invalid')], error_messages={'unique': 'A user with that username already exists.'}, unique=True, verbose_name='username', help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=30)),
- ('first_name', models.CharField(verbose_name='first name', max_length=30, blank=True)),
- ('last_name', models.CharField(verbose_name='last name', max_length=30, blank=True)),
- ('email', models.EmailField(verbose_name='email address', max_length=254, blank=True)),
- ('is_staff', models.BooleanField(default=False, verbose_name='staff status', help_text='Designates whether the user can log into this admin site.')),
- ('is_active', models.BooleanField(default=True, verbose_name='active', help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.')),
- ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
- ('name', models.CharField(verbose_name='Name of User', max_length=255, blank=True)),
- ('groups', models.ManyToManyField(to='auth.Group', verbose_name='groups', blank=True, related_name='user_set', help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_query_name='user')),
- ('user_permissions', models.ManyToManyField(to='auth.Permission', verbose_name='user permissions', blank=True, related_name='user_set', help_text='Specific permissions for this user.', related_query_name='user')),
- ],
- options={
- 'verbose_name': 'user',
- 'verbose_name_plural': 'users',
- 'abstract': False,
- },
- managers=[
- ('objects', django.contrib.auth.models.UserManager()),
- ],
- ),
- ]