0001_initial.py 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. # Generated by Django 4.1.3 on 2023-03-31 19:43
  2. import django.contrib.auth.models
  3. import django.contrib.auth.validators
  4. from django.db import migrations, models
  5. import django.utils.timezone
  6. class Migration(migrations.Migration):
  7. initial = True
  8. dependencies = [
  9. ("auth", "0012_alter_user_first_name_max_length"),
  10. ]
  11. operations = [
  12. migrations.CreateModel(
  13. name="SharixUser",
  14. fields=[
  15. (
  16. "id",
  17. models.BigAutoField(
  18. auto_created=True,
  19. primary_key=True,
  20. serialize=False,
  21. verbose_name="ID",
  22. ),
  23. ),
  24. ("password", models.CharField(max_length=128, verbose_name="password")),
  25. (
  26. "last_login",
  27. models.DateTimeField(
  28. blank=True, null=True, verbose_name="last login"
  29. ),
  30. ),
  31. (
  32. "is_superuser",
  33. models.BooleanField(
  34. default=False,
  35. help_text="Designates that this user has all permissions without explicitly assigning them.",
  36. verbose_name="superuser status",
  37. ),
  38. ),
  39. (
  40. "username",
  41. models.CharField(
  42. error_messages={
  43. "unique": "A user with that username already exists."
  44. },
  45. help_text="Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
  46. max_length=150,
  47. unique=True,
  48. validators=[
  49. django.contrib.auth.validators.UnicodeUsernameValidator()
  50. ],
  51. verbose_name="username",
  52. ),
  53. ),
  54. (
  55. "first_name",
  56. models.CharField(
  57. blank=True, max_length=150, verbose_name="first name"
  58. ),
  59. ),
  60. (
  61. "last_name",
  62. models.CharField(
  63. blank=True, max_length=150, verbose_name="last name"
  64. ),
  65. ),
  66. (
  67. "email",
  68. models.EmailField(
  69. blank=True, max_length=254, verbose_name="email address"
  70. ),
  71. ),
  72. (
  73. "is_staff",
  74. models.BooleanField(
  75. default=False,
  76. help_text="Designates whether the user can log into this admin site.",
  77. verbose_name="staff status",
  78. ),
  79. ),
  80. (
  81. "is_active",
  82. models.BooleanField(
  83. default=True,
  84. help_text="Designates whether this user should be treated as active. Unselect this instead of deleting accounts.",
  85. verbose_name="active",
  86. ),
  87. ),
  88. (
  89. "date_joined",
  90. models.DateTimeField(
  91. default=django.utils.timezone.now, verbose_name="date joined"
  92. ),
  93. ),
  94. (
  95. "phone_number",
  96. models.CharField(
  97. help_text="А здесь можно добавить описание поля",
  98. max_length=20,
  99. unique=True,
  100. verbose_name="Номер телефона",
  101. ),
  102. ),
  103. (
  104. "groups",
  105. models.ManyToManyField(
  106. blank=True,
  107. help_text="The groups this user belongs to. A user will get all permissions granted to each of their groups.",
  108. related_name="user_set",
  109. related_query_name="user",
  110. to="auth.group",
  111. verbose_name="groups",
  112. ),
  113. ),
  114. (
  115. "user_permissions",
  116. models.ManyToManyField(
  117. blank=True,
  118. help_text="Specific permissions for this user.",
  119. related_name="user_set",
  120. related_query_name="user",
  121. to="auth.permission",
  122. verbose_name="user permissions",
  123. ),
  124. ),
  125. ],
  126. options={
  127. "db_table": "auth_user",
  128. },
  129. managers=[
  130. ("objects", django.contrib.auth.models.UserManager()),
  131. ],
  132. ),
  133. ]