PageRenderTime 45ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/mercatitulo/users/migrations/0001_initial.py

https://gitlab.com/cavadu/mercatitulo
Python | 44 lines | 38 code | 5 blank | 1 comment | 0 complexity | e3d5bc86c4e1a9b2c84fed339cd0e17d MD5 | raw file
  1. # -*- coding: utf-8 -*-
  2. from __future__ import unicode_literals
  3. from django.db import models, migrations
  4. import django.utils.timezone
  5. import django.contrib.auth.models
  6. import django.core.validators
  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(primary_key=True, verbose_name='ID', serialize=False, auto_created=True)),
  16. ('password', models.CharField(max_length=128, verbose_name='password')),
  17. ('last_login', models.DateTimeField(null=True, verbose_name='last login', blank=True)),
  18. ('is_superuser', models.BooleanField(help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status', default=False)),
  19. ('username', models.CharField(max_length=30, validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.', 'invalid')], verbose_name='username', error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', unique=True)),
  20. ('first_name', models.CharField(max_length=30, verbose_name='first name', blank=True)),
  21. ('last_name', models.CharField(max_length=30, verbose_name='last name', blank=True)),
  22. ('email', models.EmailField(max_length=254, verbose_name='email address', blank=True)),
  23. ('is_staff', models.BooleanField(help_text='Designates whether the user can log into this admin site.', verbose_name='staff status', default=False)),
  24. ('is_active', models.BooleanField(help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active', default=True)),
  25. ('date_joined', models.DateTimeField(verbose_name='date joined', default=django.utils.timezone.now)),
  26. ('groups', models.ManyToManyField(related_name='user_set', blank=True, verbose_name='groups', to='auth.Group', help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_query_name='user')),
  27. ('user_permissions', models.ManyToManyField(related_name='user_set', blank=True, verbose_name='user permissions', to='auth.Permission', help_text='Specific permissions for this user.', related_query_name='user')),
  28. ('name', models.CharField(max_length=255, verbose_name='Name of User', blank=True)),
  29. ],
  30. options={
  31. 'verbose_name': 'user',
  32. 'abstract': False,
  33. 'verbose_name_plural': 'users',
  34. },
  35. managers=[
  36. (b'objects', django.contrib.auth.models.UserManager()),
  37. ],
  38. ),
  39. ]