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 Oct 4, 2021
1 parent 2c595ec commit 567f145
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 14 deletions.
13 changes: 9 additions & 4 deletions feder/letters/migrations/0027_auto_20211004_0220.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@
class Migration(migrations.Migration):

dependencies = [
('letters', '0026_auto_20210505_1327'),
("letters", "0026_auto_20210505_1327"),
]

operations = [
migrations.AlterField(
model_name='letter',
name='eml',
field=models.FileField(blank=True, null=True, upload_to=feder.letters.models.messages_eml, verbose_name='File'),
model_name="letter",
name="eml",
field=models.FileField(
blank=True,
null=True,
upload_to=feder.letters.models.messages_eml,
verbose_name="File",
),
),
]
2 changes: 2 additions & 0 deletions feder/letters/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ def get_queryset(self):

def messages_eml():
return date_random_path("messages")()


class Letter(AbstractRecord):
SPAM = Choices(
(0, "unknown", _("Unknown")),
Expand Down
18 changes: 11 additions & 7 deletions feder/parcels/migrations/0003_auto_20211004_0220.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,22 @@
class Migration(migrations.Migration):

dependencies = [
('parcels', '0002_auto_20181021_0220'),
("parcels", "0002_auto_20181021_0220"),
]

operations = [
migrations.AlterField(
model_name='incomingparcelpost',
name='content',
field=models.FileField(upload_to=feder.parcels.models.parcel_upload_to, verbose_name='Content'),
model_name="incomingparcelpost",
name="content",
field=models.FileField(
upload_to=feder.parcels.models.parcel_upload_to, verbose_name="Content"
),
),
migrations.AlterField(
model_name='outgoingparcelpost',
name='content',
field=models.FileField(upload_to=feder.parcels.models.parcel_upload_to, verbose_name='Content'),
model_name="outgoingparcelpost",
name="content",
field=models.FileField(
upload_to=feder.parcels.models.parcel_upload_to, verbose_name="Content"
),
),
]
5 changes: 2 additions & 3 deletions feder/parcels/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ def for_user(self, user):
def parcel_upload_to():
return date_random_path("parcel")()


class AbstractParcelPost(AbstractRecord):
title = models.CharField(verbose_name=_("Title"), max_length=200)
content = models.FileField(
upload_to=parcel_upload_to, verbose_name=_("Content")
)
content = models.FileField(upload_to=parcel_upload_to, verbose_name=_("Content"))
created_by = models.ForeignKey(
settings.AUTH_USER_MODEL, on_delete=models.CASCADE, help_text=_("Created by")
)
Expand Down

0 comments on commit 567f145

Please sign in to comment.