Commit 786360f9 authored by Luko van der Maas's avatar Luko van der Maas
Browse files

Merge branch 'fix/file-validators' into 'master'

Fix broken file validators

See merge request !1257
parents 3b795f16 befba3be
# Generated by Django 2.2.1 on 2019-05-16 13:36
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('documents', '0011_auto_20190327_1948'),
]
operations = [
migrations.AlterField(
model_name='document',
name='file_en',
field=models.FileField(upload_to='documents/', validators=[django.core.validators.FileExtensionValidator(['txt', 'pdf', 'jpg', 'jpeg', 'png'])], verbose_name='file (EN)'),
),
migrations.AlterField(
model_name='document',
name='file_nl',
field=models.FileField(upload_to='documents/', validators=[django.core.validators.FileExtensionValidator(['txt', 'pdf', 'jpg', 'jpeg', 'png'])], verbose_name='file (NL)'),
),
]
...@@ -49,7 +49,7 @@ class Document(models.Model, metaclass=ModelTranslateMeta): ...@@ -49,7 +49,7 @@ class Document(models.Model, metaclass=ModelTranslateMeta):
verbose_name=_('file'), verbose_name=_('file'),
upload_to='documents/', upload_to='documents/',
validators=[FileExtensionValidator( validators=[FileExtensionValidator(
['.txt', '.pdf', '.jpg', '.jpeg', '.png'])], ['txt', 'pdf', 'jpg', 'jpeg', 'png'])],
) )
members_only = models.BooleanField( members_only = models.BooleanField(
......
# Generated by Django 2.2.1 on 2019-05-16 13:36
import django.core.validators
from django.db import migrations, models
import thabloid.models
class Migration(migrations.Migration):
dependencies = [
('thabloid', '0004_auto_20190327_1948'),
]
operations = [
migrations.AlterField(
model_name='thabloid',
name='file',
field=models.FileField(upload_to=thabloid.models.thabloid_filename, validators=[django.core.validators.FileExtensionValidator(['txt', 'pdf', 'jpg', 'jpeg', 'png'])]),
),
]
...@@ -29,7 +29,7 @@ class Thabloid(models.Model): ...@@ -29,7 +29,7 @@ class Thabloid(models.Model):
file = models.FileField( file = models.FileField(
upload_to=thabloid_filename, upload_to=thabloid_filename,
validators=[FileExtensionValidator( validators=[FileExtensionValidator(
['.txt', '.pdf', '.jpg', '.jpeg', '.png'])], ['txt', 'pdf', 'jpg', 'jpeg', 'png'])],
) )
class Meta: class Meta:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment