/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

  1. # -*- coding: utf-8 -*-
  2. from __future__ import unicode_literals
  3. from django.db import migrations, models
  4. import django.utils.timezone
  5. import django.core.validators
  6. import django.contrib.auth.models
  7. class Migration(migrations.Migration):
  8. dependencies = [
  9. ('auth', '0006_require_contenttypes_0002'),
  10. ]
  11. operations = [
  12. migrations.CreateModel(
  13. name='User',
  14. fields=[
  15. ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
  16. ('password', models.CharField(verbose_name='password', max_length=128)),
  17. ('last_login', models.DateTimeField(blank=True, verbose_name='last login', null=True)),
  18. ('is_superuser', models.BooleanField(default=False, verbose_name='superuser status', help_text='Designates that this user has all permissions without explicitly assigning them.')),
  19. ('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)),
  20. ('first_name', models.CharField(verbose_name='first name', max_length=30, blank=True)),
  21. ('last_name', models.CharField(verbose_name='last name', max_length=30, blank=True)),
  22. ('email', models.EmailField(verbose_name='email address', max_length=254, blank=True)),
  23. ('is_staff', models.BooleanField(default=False, verbose_name='staff status', help_text='Designates whether the user can log into this admin site.')),
  24. ('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.')),
  25. ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
  26. ('name', models.CharField(verbose_name='Name of User', max_length=255, blank=True)),
  27. ('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')),
  28. ('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')),
  29. ],
  30. options={
  31. 'verbose_name': 'user',
  32. 'verbose_name_plural': 'users',
  33. 'abstract': False,
  34. },
  35. managers=[
  36. ('objects', django.contrib.auth.models.UserManager()),
  37. ],
  38. ),
  39. ]