Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 29, 2024
1 parent 11bd528 commit 7c4a3f0
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 23 deletions.
8 changes: 6 additions & 2 deletions accounts/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ class Migration(migrations.Migration):
("last_name", models.CharField(max_length=32)),
("is_superuser", models.BooleanField()),
],
options={"abstract": False,},
managers=[("objects", accounts.managers.AccountManager()),],
options={
"abstract": False,
},
managers=[
("objects", accounts.managers.AccountManager()),
],
),
]
7 changes: 5 additions & 2 deletions accounts/migrations/0003_auto_20200715_0405.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ class Migration(migrations.Migration):

operations = [
migrations.AlterModelOptions(
name="account", options={"ordering": ["first_name"]},
name="account",
options={"ordering": ["first_name"]},
),
migrations.CreateModel(
name="Shift",
Expand Down Expand Up @@ -44,6 +45,8 @@ class Migration(migrations.Migration):
),
),
],
options={"ordering": ["-date"],},
options={
"ordering": ["-date"],
},
),
]
4 changes: 3 additions & 1 deletion common/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ def post(self, request):
for chunk in new_template.chunks():
destination.write(chunk)
messages.add_message(
request, messages.SUCCESS, "The settings have been sucessfully saved.",
request,
messages.SUCCESS,
"The settings have been sucessfully saved.",
)

form = SettingsForm()
Expand Down
4 changes: 3 additions & 1 deletion invoices/migrations/0002_auto_20200510_0147.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class Migration(migrations.Migration):

operations = [
migrations.RenameField(
model_name="invoiceitem", old_name="hours", new_name="worked_hours",
model_name="invoiceitem",
old_name="hours",
new_name="worked_hours",
),
]
4 changes: 3 additions & 1 deletion invoices/migrations/0003_auto_20200510_2040.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class Migration(migrations.Migration):

operations = [
migrations.RenameField(
model_name="invoiceitem", old_name="title", new_name="description",
model_name="invoiceitem",
old_name="title",
new_name="description",
),
]
13 changes: 10 additions & 3 deletions invoices/migrations/0006_auto_20200610_0320.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,22 @@ class Migration(migrations.Migration):
],
),
migrations.RenameField(
model_name="invoice", old_name="guid", new_name="invoice_id",
model_name="invoice",
old_name="guid",
new_name="invoice_id",
),
migrations.RemoveField(
model_name="invoice",
name="hourly_rate",
),
migrations.RemoveField(model_name="invoice", name="hourly_rate",),
migrations.AlterField(
model_name="invoice",
name="status",
field=models.PositiveSmallIntegerField(default=0),
),
migrations.DeleteModel(name="InvoiceItem",),
migrations.DeleteModel(
name="InvoiceItem",
),
migrations.AddField(
model_name="item",
name="invoice",
Expand Down
6 changes: 3 additions & 3 deletions invoices/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ def get(self, request):
)
return HttpResponseRedirect(reverse("invoices:list"))
response = HttpResponse(pdf, content_type="application/pdf")
response[
"Content-Disposition"
] = f'inline; filename="{self.invoice.invoice_id}.pdf"'
response["Content-Disposition"] = (
f'inline; filename="{self.invoice.invoice_id}.pdf"'
)
return response


Expand Down
4 changes: 3 additions & 1 deletion partners/migrations/0002_partner_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class Migration(migrations.Migration):

operations = [
migrations.AddField(
model_name="partner", name="notes", field=models.TextField(blank=True),
model_name="partner",
name="notes",
field=models.TextField(blank=True),
),
]
12 changes: 9 additions & 3 deletions partners/migrations/0003_auto_20200510_2052.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@ class Migration(migrations.Migration):

operations = [
migrations.RenameField(
model_name="partner", old_name="manager_email", new_name="contact_email",
model_name="partner",
old_name="manager_email",
new_name="contact_email",
),
migrations.RenameField(
model_name="partner", old_name="manager_name", new_name="contact_name",
model_name="partner",
old_name="manager_name",
new_name="contact_name",
),
migrations.RenameField(
model_name="partner", old_name="manager_phone", new_name="contact_phone",
model_name="partner",
old_name="manager_phone",
new_name="contact_phone",
),
]
4 changes: 3 additions & 1 deletion partners/migrations/0004_auto_20200609_0514.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class Migration(migrations.Migration):

operations = [
migrations.RenameField(
model_name="partner", old_name="guid", new_name="partner_id",
model_name="partner",
old_name="guid",
new_name="partner_id",
),
]
3 changes: 2 additions & 1 deletion partners/migrations/0007_auto_20200715_0156.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class Migration(migrations.Migration):

operations = [
migrations.AlterModelOptions(
name="partner", options={"ordering": ["company"]},
name="partner",
options={"ordering": ["company"]},
),
]
14 changes: 11 additions & 3 deletions servers/migrations/0002_auto_20200612_0325.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,18 @@ class Migration(migrations.Migration):
]

operations = [
migrations.RemoveField(model_name="server", name="ip_address",),
migrations.RemoveField(model_name="server", name="linode_label",),
migrations.RemoveField(
model_name="server",
name="ip_address",
),
migrations.RemoveField(
model_name="server",
name="linode_label",
),
migrations.AlterField(
model_name="server", name="services", field=models.TextField(),
model_name="server",
name="services",
field=models.TextField(),
),
migrations.AlterField(
model_name="server",
Expand Down
4 changes: 3 additions & 1 deletion tests/test_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ def test_incorrect_password(self):
response, "The email and/or password you entered are incorrect."
)
response = self.client.post(
"/accounts/login/", {"email": self.user.email, "password": ""}, follow=True,
"/accounts/login/",
{"email": self.user.email, "password": ""},
follow=True,
)
self.assertContains(response, "This field is required.")
response = self.client.post(
Expand Down

0 comments on commit 7c4a3f0

Please sign in to comment.