Limit access to files to user

No database migration is made
This commit is contained in:
Edgar P. Burkhart 2022-12-31 17:28:15 +01:00
parent de06312a2a
commit 06704aaa77
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
7 changed files with 48 additions and 35 deletions

View file

@ -19,7 +19,7 @@ class Migration(migrations.Migration):
name="file",
field=models.FileField(
max_length=128,
upload_to=main.models.invoice_path,
upload_to=main.models.get_path,
validators=[django.core.validators.FileExtensionValidator(["pdf"])],
verbose_name="Fichier",
),
@ -40,7 +40,7 @@ class Migration(migrations.Migration):
blank=True,
default="",
max_length=256,
upload_to=main.models.snapshot_path,
upload_to=main.models.get_path,
validators=[django.core.validators.FileExtensionValidator(["pdf"])],
verbose_name="Fichier",
),

View file

@ -118,7 +118,7 @@ class Migration(migrations.Migration):
name="file",
field=models.FileField(
max_length=128,
upload_to=main.models.invoice_path,
upload_to=main.models.get_path,
validators=[django.core.validators.FileExtensionValidator(["pdf"])],
verbose_name="File",
),
@ -174,7 +174,7 @@ class Migration(migrations.Migration):
blank=True,
default="",
max_length=256,
upload_to=main.models.snapshot_path,
upload_to=main.models.get_path,
validators=[django.core.validators.FileExtensionValidator(["pdf"])],
verbose_name="File",
),