Skip to content

Commit

Permalink
Merge 41c4fa3 into e4fa2e5
Browse files Browse the repository at this point in the history
  • Loading branch information
nbarlowATI committed May 24, 2022
2 parents e4fa2e5 + 41c4fa3 commit 94ca12e
Show file tree
Hide file tree
Showing 18 changed files with 1,228 additions and 468 deletions.
271 changes: 149 additions & 122 deletions eap_backend/eap_api/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Generated by Django 3.2.8 on 2022-05-12 10:56
# Generated by Django 3.2.8 on 2022-05-19 08:55

from django.conf import settings
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
Expand All @@ -16,6 +17,124 @@ class Migration(migrations.Migration):
]

operations = [
migrations.CreateModel(
name="EAPUser",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("password", models.CharField(max_length=128, verbose_name="password")),
(
"last_login",
models.DateTimeField(
blank=True, null=True, verbose_name="last login"
),
),
(
"is_superuser",
models.BooleanField(
default=False,
help_text="""Designates that this user has all permissions,
without explicitly assigning them.""",
verbose_name="superuser status",
),
),
(
"username",
models.CharField(
error_messages={
"unique": "A user with that username already exists."
},
help_text="""Required. 150 characters or fewer.
Letters, digits and @/./+/-/_ only.""",
max_length=150,
unique=True,
validators=[
django.contrib.auth.validators.UnicodeUsernameValidator()
],
verbose_name="username",
),
),
(
"first_name",
models.CharField(
blank=True, max_length=150, verbose_name="first name"
),
),
(
"last_name",
models.CharField(
blank=True, max_length=150, verbose_name="last name"
),
),
(
"email",
models.EmailField(
blank=True, max_length=254, verbose_name="email address"
),
),
(
"is_staff",
models.BooleanField(
default=False,
help_text="Designates whether the user can log into admin site.",
verbose_name="staff status",
),
),
(
"is_active",
models.BooleanField(
default=True,
help_text="""Designates whether this user should be treated as
active. Unselect this instead of deleting accounts.""",
verbose_name="active",
),
),
(
"date_joined",
models.DateTimeField(
default=django.utils.timezone.now, verbose_name="date joined"
),
),
(
"groups",
models.ManyToManyField(
blank=True,
help_text="""The groups this user belongs to.
A user will get permissions granted to their groups.""",
related_name="user_set",
related_query_name="user",
to="auth.Group",
verbose_name="groups",
),
),
(
"user_permissions",
models.ManyToManyField(
blank=True,
help_text="Specific permissions for this user.",
related_name="user_set",
related_query_name="user",
to="auth.Permission",
verbose_name="user permissions",
),
),
],
options={
"verbose_name": "user",
"verbose_name_plural": "users",
"abstract": False,
},
managers=[
("objects", django.contrib.auth.models.UserManager()),
],
),
migrations.CreateModel(
name="AssuranceCase",
fields=[
Expand All @@ -37,6 +156,15 @@ class Migration(migrations.Migration):
blank=True, default=None, max_length=50, null=True
),
),
(
"owner",
models.ForeignKey(
null=True,
on_delete=django.db.models.deletion.CASCADE,
related_name="cases",
to=settings.AUTH_USER_MODEL,
),
),
],
),
migrations.CreateModel(
Expand Down Expand Up @@ -207,7 +335,7 @@ class Migration(migrations.Migration):
},
),
migrations.CreateModel(
name="Context",
name="EAPGroup",
fields=[
(
"id",
Expand All @@ -219,24 +347,25 @@ class Migration(migrations.Migration):
),
),
("name", models.CharField(max_length=200)),
("short_description", models.CharField(max_length=1000)),
("long_description", models.CharField(max_length=3000)),
("created_date", models.DateTimeField(auto_now_add=True)),
(
"goal",
"member",
models.ManyToManyField(
related_name="all_groups", to=settings.AUTH_USER_MODEL
),
),
(
"owner",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="context",
to="eap_api.toplevelnormativegoal",
related_name="owned_groups",
to=settings.AUTH_USER_MODEL,
),
),
],
options={
"abstract": False,
},
),
migrations.CreateModel(
name="EAPUser",
name="Context",
fields=[
(
"id",
Expand All @@ -247,123 +376,21 @@ class Migration(migrations.Migration):
verbose_name="ID",
),
),
("password", models.CharField(max_length=128, verbose_name="password")),
(
"last_login",
models.DateTimeField(
blank=True, null=True, verbose_name="last login"
),
),
(
"is_superuser",
models.BooleanField(
default=False,
help_text=(
"Designates that this user has all permissions "
"without explicitly assigning them."
),
verbose_name="superuser status",
),
),
(
"username",
models.CharField(
error_messages={
"unique": "A user with that username already exists."
},
help_text=(
"Required. 150 characters or fewer. "
"Letters, digits and @/./+/-/_ only."
),
max_length=150,
unique=True,
validators=[
django.contrib.auth.validators.UnicodeUsernameValidator()
],
verbose_name="username",
),
),
(
"first_name",
models.CharField(
blank=True, max_length=150, verbose_name="first name"
),
),
(
"last_name",
models.CharField(
blank=True, max_length=150, verbose_name="last name"
),
),
(
"email",
models.EmailField(
blank=True, max_length=254, verbose_name="email address"
),
),
(
"is_staff",
models.BooleanField(
default=False,
help_text=(
"Designates whether the user can log into this "
"admin site."
),
verbose_name="staff status",
),
),
(
"is_active",
models.BooleanField(
default=True,
help_text=(
"Designates whether this user should be treated as "
"active. Unselect this instead of deleting "
"accounts."
),
verbose_name="active",
),
),
(
"date_joined",
models.DateTimeField(
default=django.utils.timezone.now, verbose_name="date joined"
),
),
(
"groups",
models.ManyToManyField(
blank=True,
help_text=(
"The groups this user belongs to. "
"A user will get all permissions granted to each of their "
"groups."
),
related_name="user_set",
related_query_name="user",
to="auth.Group",
verbose_name="groups",
),
),
("name", models.CharField(max_length=200)),
("short_description", models.CharField(max_length=1000)),
("long_description", models.CharField(max_length=3000)),
("created_date", models.DateTimeField(auto_now_add=True)),
(
"user_permissions",
models.ManyToManyField(
blank=True,
help_text="Specific permissions for this user.",
related_name="user_set",
related_query_name="user",
to="auth.Permission",
verbose_name="user permissions",
"goal",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="context",
to="eap_api.toplevelnormativegoal",
),
),
],
options={
"verbose_name": "user",
"verbose_name_plural": "users",
"abstract": False,
},
managers=[
("objects", django.contrib.auth.models.UserManager()),
],
),
]
25 changes: 0 additions & 25 deletions eap_backend/eap_api/migrations/0002_assurancecase_owner.py

This file was deleted.

27 changes: 27 additions & 0 deletions eap_backend/eap_api/migrations/0002_auto_20220519_1546.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Generated by Django 3.2.8 on 2022-05-19 15:46

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("eap_api", "0001_initial"),
]

operations = [
migrations.AddField(
model_name="assurancecase",
name="edit_groups",
field=models.ManyToManyField(
related_name="editable_cases", to="eap_api.EAPGroup"
),
),
migrations.AddField(
model_name="assurancecase",
name="view_groups",
field=models.ManyToManyField(
related_name="viewable_cases", to="eap_api.EAPGroup"
),
),
]
Loading

0 comments on commit 94ca12e

Please sign in to comment.