0001_initial.py 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # Generated by Django 3.0rc1 on 2019-11-21 22:09
  2. from django.db import migrations, models
  3. class Migration(migrations.Migration):
  4. initial = True
  5. dependencies = [
  6. ("auth", "0011_update_proxy_permissions"),
  7. ]
  8. operations = [
  9. migrations.CreateModel(
  10. name="User",
  11. fields=[
  12. (
  13. "id",
  14. models.AutoField(
  15. auto_created=True,
  16. primary_key=True,
  17. serialize=False,
  18. verbose_name="ID",
  19. ),
  20. ),
  21. ("password", models.CharField(max_length=128, verbose_name="password")),
  22. (
  23. "last_login",
  24. models.DateTimeField(
  25. blank=True, null=True, verbose_name="last login"
  26. ),
  27. ),
  28. (
  29. "is_superuser",
  30. models.BooleanField(
  31. default=False,
  32. help_text="Designates that this user has all permissions without explicitly assigning them.",
  33. verbose_name="superuser status",
  34. ),
  35. ),
  36. ("email", models.EmailField(max_length=254, null=True, unique=True)),
  37. (
  38. "first_name",
  39. models.CharField(
  40. blank=True, max_length=30, verbose_name="first name"
  41. ),
  42. ),
  43. (
  44. "last_name",
  45. models.CharField(
  46. blank=True, max_length=150, verbose_name="last name"
  47. ),
  48. ),
  49. (
  50. "is_staff",
  51. models.BooleanField(
  52. default=False,
  53. help_text="Designates whether the user can log into this site.",
  54. verbose_name="staff status",
  55. ),
  56. ),
  57. (
  58. "is_active",
  59. models.BooleanField(
  60. default=True,
  61. help_text="Designates whether this user should be treated as active. Unselect this instead of deleting accounts.",
  62. verbose_name="active",
  63. ),
  64. ),
  65. (
  66. "groups",
  67. models.ManyToManyField(
  68. blank=True,
  69. help_text="The groups this user belongs to. A user will get all permissions granted to each of their groups.",
  70. related_name="user_set",
  71. related_query_name="user",
  72. to="auth.Group",
  73. verbose_name="groups",
  74. ),
  75. ),
  76. (
  77. "user_permissions",
  78. models.ManyToManyField(
  79. blank=True,
  80. help_text="Specific permissions for this user.",
  81. related_name="user_set",
  82. related_query_name="user",
  83. to="auth.Permission",
  84. verbose_name="user permissions",
  85. ),
  86. ),
  87. ],
  88. options={
  89. "abstract": False,
  90. },
  91. ),
  92. ]