Skip to content

Commit

Permalink
Revert "format"
Browse files Browse the repository at this point in the history
This reverts commit 034a817.
  • Loading branch information
CalebPena committed May 28, 2024
1 parent 85b4451 commit 6a1b291
Show file tree
Hide file tree
Showing 275 changed files with 3,715 additions and 6,376 deletions.
23 changes: 10 additions & 13 deletions authentication/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,23 @@


class CustomUserAdmin(UserAdmin):
ordering = ("email_or_cell", "email")
ordering = ('email_or_cell', 'email')

list_display = ("email_or_cell", "is_staff")
list_filter = ("is_staff",)
list_display = ('email_or_cell', 'is_staff')
list_filter = ('is_staff',)

fieldsets = (
(None, {"fields": ("email_or_cell", "password")}),
("Personal info", {"fields": ("email", "cell")}),
("Permissions", {"fields": ("is_staff", "tcpa_consent", "groups")}),
(None, {'fields': ('email_or_cell', 'password')}),
('Personal info', {'fields': ('email', 'cell')}),
('Permissions', {'fields': ('is_staff', 'tcpa_consent', 'groups')}),
)
# add_fieldsets is not a standard ModelAdmin attribute. UserAdmin
# overrides get_fieldsets to use this attribute when creating a user.
add_fieldsets = (
(
None,
{
"classes": ("wide",),
"fields": ("email_or_cell", "password1", "password2", "email", "cell", "tcpa_consent", "is_staff"),
},
),
(None, {
'classes': ('wide',),
'fields': ('email_or_cell', 'password1', 'password2', 'email', 'cell', 'tcpa_consent', 'is_staff'),
}),
)


Expand Down
4 changes: 2 additions & 2 deletions authentication/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@


class AuthConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "authentication"
default_auto_field = 'django.db.models.BigAutoField'
name = 'authentication'
90 changes: 20 additions & 70 deletions authentication/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,88 +7,38 @@


class Migration(migrations.Migration):

initial = True

dependencies = [
("auth", "0012_alter_user_first_name_max_length"),
('auth', '0012_alter_user_first_name_max_length'),
]

operations = [
migrations.CreateModel(
name="User",
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",
),
),
('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,
'verbose_name': 'user',
'verbose_name_plural': 'users',
'abstract': False,
},
managers=[
("objects", django.contrib.auth.models.UserManager()),
('objects', django.contrib.auth.models.UserManager()),
],
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,31 @@


class Migration(migrations.Migration):

dependencies = [
("authentication", "0001_initial"),
('authentication', '0001_initial'),
]

operations = [
migrations.RemoveField(
model_name="user",
name="username",
model_name='user',
name='username',
),
migrations.AddField(
model_name="user",
name="cell",
field=phonenumber_field.modelfields.PhoneNumberField(
default="+17202373591", max_length=128, region=None, unique=True
),
model_name='user',
name='cell',
field=phonenumber_field.modelfields.PhoneNumberField(default='+17202373591', max_length=128, region=None, unique=True),
preserve_default=False,
),
migrations.AddField(
model_name="user",
name="email_or_cell",
field=models.CharField(default="[email protected]", max_length=320, unique=True),
model_name='user',
name='email_or_cell',
field=models.CharField(default='[email protected]', max_length=320, unique=True),
preserve_default=False,
),
migrations.AlterField(
model_name="user",
name="email",
field=models.EmailField(max_length=254, unique=True, verbose_name="email address"),
model_name='user',
name='email',
field=models.EmailField(max_length=254, unique=True, verbose_name='email address'),
),
]
17 changes: 6 additions & 11 deletions authentication/migrations/0003_user_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,17 @@


class Migration(migrations.Migration):

dependencies = [
("screener", "0016_remove_screen_email"),
("authentication", "0002_remove_user_username_user_cell_user_email_or_cell_and_more"),
('screener', '0016_remove_screen_email'),
('authentication', '0002_remove_user_username_user_cell_user_email_or_cell_and_more'),
]

operations = [
migrations.AddField(
model_name="user",
name="screen",
field=models.ForeignKey(
blank=True,
default=1,
on_delete=django.db.models.deletion.CASCADE,
related_name="screen",
to="screener.screen",
),
model_name='user',
name='screen',
field=models.ForeignKey(blank=True, default=1, on_delete=django.db.models.deletion.CASCADE, related_name='screen', to='screener.screen'),
preserve_default=False,
),
]
7 changes: 4 additions & 3 deletions authentication/migrations/0004_user_tcpa_consent.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@


class Migration(migrations.Migration):

dependencies = [
("authentication", "0003_user_screen"),
('authentication', '0003_user_screen'),
]

operations = [
migrations.AddField(
model_name="user",
name="tcpa_consent",
model_name='user',
name='tcpa_consent',
field=models.BooleanField(default=False),
preserve_default=False,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,26 @@


class Migration(migrations.Migration):

dependencies = [
("screener", "0017_screen_last_email_request_date"),
("authentication", "0004_user_tcpa_consent"),
('screener', '0017_screen_last_email_request_date'),
('authentication', '0004_user_tcpa_consent'),
]

operations = [
migrations.AlterField(
model_name="user",
name="cell",
model_name='user',
name='cell',
field=phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, region=None, unique=True),
),
migrations.AlterField(
model_name="user",
name="email",
field=models.EmailField(blank=True, max_length=254, unique=True, verbose_name="email address"),
model_name='user',
name='email',
field=models.EmailField(blank=True, max_length=254, unique=True, verbose_name='email address'),
),
migrations.AlterField(
model_name="user",
name="screen",
field=models.ForeignKey(
blank=True, on_delete=django.db.models.deletion.CASCADE, related_name="users", to="screener.screen"
),
model_name='user',
name='screen',
field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='users', to='screener.screen'),
),
]
7 changes: 4 additions & 3 deletions authentication/migrations/0006_remove_user_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@


class Migration(migrations.Migration):

dependencies = [
("authentication", "0005_alter_user_cell_alter_user_email_alter_user_screen"),
('authentication', '0005_alter_user_cell_alter_user_email_alter_user_screen'),
]

operations = [
migrations.RemoveField(
model_name="user",
name="screen",
model_name='user',
name='screen',
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@


class Migration(migrations.Migration):

dependencies = [
("authentication", "0006_remove_user_screen"),
('authentication', '0006_remove_user_screen'),
]

operations = [
migrations.AlterField(
model_name="user",
name="cell",
field=phonenumber_field.modelfields.PhoneNumberField(
blank=True, max_length=128, null=True, region=None, unique=True
),
model_name='user',
name='cell',
field=phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, null=True, region=None, unique=True),
),
migrations.AlterField(
model_name="user",
name="email",
field=models.EmailField(blank=True, max_length=254, null=True, unique=True, verbose_name="email address"),
model_name='user',
name='email',
field=models.EmailField(blank=True, max_length=254, null=True, unique=True, verbose_name='email address'),
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@


class Migration(migrations.Migration):

dependencies = [
("authentication", "0007_alter_user_cell_alter_user_email"),
('authentication', '0007_alter_user_cell_alter_user_email'),
]

operations = [
migrations.AddField(
model_name="user",
name="send_offers",
model_name='user',
name='send_offers',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name="user",
name="send_updates",
model_name='user',
name='send_updates',
field=models.BooleanField(default=False),
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@


class Migration(migrations.Migration):

dependencies = [
("authentication", "0008_user_send_offers_user_send_updates"),
('authentication', '0008_user_send_offers_user_send_updates'),
]

operations = [
migrations.AlterField(
model_name="user",
name="first_name",
model_name='user',
name='first_name',
field=models.CharField(blank=True, max_length=320, null=True),
),
migrations.AlterField(
model_name="user",
name="last_name",
model_name='user',
name='last_name',
field=models.CharField(blank=True, max_length=320, null=True),
),
]
Loading

0 comments on commit 6a1b291

Please sign in to comment.