diff --git a/.secrets.baseline b/.secrets.baseline index c863757e..6bab73a8 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -136,6 +136,15 @@ "line_number": 20 } ], + "conftest.py": [ + { + "type": "Secret Keyword", + "filename": "conftest.py", + "hashed_secret": "e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4", + "is_verified": false, + "line_number": 123 + } + ], "docker-compose.yml": [ { "type": "Secret Keyword", @@ -205,13 +214,54 @@ "line_number": 19 } ], - "conftest.py": [ + "testapp/main/settings/dev.py": [ { "type": "Secret Keyword", - "filename": "conftest.py", - "hashed_secret": "e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4", + "filename": "testapp/main/settings/dev.py", + "hashed_secret": "6367c48dd193d56ea7b0baad25b19455e529f5ee", "is_verified": false, - "line_number": 123 + "line_number": 17 + } + ], + "testapp/main/settings/example.dev.py": [ + { + "type": "Secret Keyword", + "filename": "testapp/main/settings/example.dev.py", + "hashed_secret": "6367c48dd193d56ea7b0baad25b19455e529f5ee", + "is_verified": false, + "line_number": 14 + } + ], + "testapp/main/settings/shared.py": [ + { + "type": "Secret Keyword", + "filename": "testapp/main/settings/shared.py", + "hashed_secret": "8f2581750096043a1c68bedea8cfa6e13ad1a2e4", + "is_verified": false, + "line_number": 40 + }, + { + "type": "Basic Auth Credentials", + "filename": "testapp/main/settings/shared.py", + "hashed_secret": "afc848c316af1a89d49826c5ae9d00ed769415f3", + "is_verified": false, + "line_number": 122 + }, + { + "type": "Secret Keyword", + "filename": "testapp/main/settings/shared.py", + "hashed_secret": "9bc34549d565d9505b287de0cd20ac77be1d3f2c", + "is_verified": false, + "line_number": 202 + } + ], + "testapp/main/settings/test.py": [ + { + "type": "Secret Keyword", + "filename": "testapp/main/settings/test.py", + "hashed_secret": "6367c48dd193d56ea7b0baad25b19455e529f5ee", + "is_verified": false, + "line_number": 9 } ], "tests/common/utils/test_urls.py": [ @@ -267,57 +317,7 @@ "is_verified": false, "line_number": 29 } - ], - "testapp/main/settings/dev.py": [ - { - "type": "Secret Keyword", - "filename": "testapp/main/settings/dev.py", - "hashed_secret": "6367c48dd193d56ea7b0baad25b19455e529f5ee", - "is_verified": false, - "line_number": 17 - } - ], - "testapp/main/settings/example.dev.py": [ - { - "type": "Secret Keyword", - "filename": "testapp/main/settings/example.dev.py", - "hashed_secret": "6367c48dd193d56ea7b0baad25b19455e529f5ee", - "is_verified": false, - "line_number": 14 - } - ], - "testapp/main/settings/shared.py": [ - { - "type": "Secret Keyword", - "filename": "testapp/main/settings/shared.py", - "hashed_secret": "8f2581750096043a1c68bedea8cfa6e13ad1a2e4", - "is_verified": false, - "line_number": 40 - }, - { - "type": "Basic Auth Credentials", - "filename": "testapp/main/settings/shared.py", - "hashed_secret": "afc848c316af1a89d49826c5ae9d00ed769415f3", - "is_verified": false, - "line_number": 120 - }, - { - "type": "Secret Keyword", - "filename": "testapp/main/settings/shared.py", - "hashed_secret": "9bc34549d565d9505b287de0cd20ac77be1d3f2c", - "is_verified": false, - "line_number": 200 - } - ], - "testapp/main/settings/test.py": [ - { - "type": "Secret Keyword", - "filename": "testapp/main/settings/test.py", - "hashed_secret": "6367c48dd193d56ea7b0baad25b19455e529f5ee", - "is_verified": false, - "line_number": 9 - } ] }, - "generated_at": "2025-02-26T21:06:50Z" + "generated_at": "2025-02-27T14:23:42Z" } diff --git a/testapp/main/settings/shared.py b/testapp/main/settings/shared.py index e9d9e34a..bee80636 100644 --- a/testapp/main/settings/shared.py +++ b/testapp/main/settings/shared.py @@ -44,6 +44,7 @@ ALLOWED_HOSTS = ["*"] +AUTH_USER_MODEL = "users.User" # Application definition @@ -74,6 +75,7 @@ "mitol.transcoding.apps.Transcoding", # test app, integrates the reusable apps "main", + "users", ] MIDDLEWARE = [ diff --git a/testapp/users/__init__.py b/testapp/users/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/testapp/users/admin.py b/testapp/users/admin.py new file mode 100644 index 00000000..846f6b40 --- /dev/null +++ b/testapp/users/admin.py @@ -0,0 +1 @@ +# Register your models here. diff --git a/testapp/users/apps.py b/testapp/users/apps.py new file mode 100644 index 00000000..88f7b179 --- /dev/null +++ b/testapp/users/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class UsersConfig(AppConfig): + default_auto_field = "django.db.models.BigAutoField" + name = "users" diff --git a/testapp/users/migrations/0001_initial.py b/testapp/users/migrations/0001_initial.py new file mode 100644 index 00000000..634bd9b1 --- /dev/null +++ b/testapp/users/migrations/0001_initial.py @@ -0,0 +1,131 @@ +# Generated by Django 4.2.16 on 2025-02-27 14:21 + +import django.contrib.auth.models +import django.contrib.auth.validators +import django.utils.timezone +from django.db import migrations, models + + +class Migration(migrations.Migration): + initial = True + + dependencies = [ + ("auth", "0012_alter_user_first_name_max_length"), + ] + + operations = [ + migrations.CreateModel( + name="User", + 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 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", + ), + ), + ( + "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()), + ], + ), + ] diff --git a/testapp/users/migrations/__init__.py b/testapp/users/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/testapp/users/models.py b/testapp/users/models.py new file mode 100644 index 00000000..75843bba --- /dev/null +++ b/testapp/users/models.py @@ -0,0 +1,6 @@ +from django.contrib.auth.models import AbstractUser + + +# Create your models here. +class User(AbstractUser): + """Custom user""" diff --git a/testapp/users/tests.py b/testapp/users/tests.py new file mode 100644 index 00000000..a39b155a --- /dev/null +++ b/testapp/users/tests.py @@ -0,0 +1 @@ +# Create your tests here. diff --git a/testapp/users/views.py b/testapp/users/views.py new file mode 100644 index 00000000..60f00ef0 --- /dev/null +++ b/testapp/users/views.py @@ -0,0 +1 @@ +# Create your views here.