From 2cfa7517a8ab5f3f0c4cd3b061500aa1157b1a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Sun, 10 Jan 2016 00:20:32 +0100 Subject: [PATCH] Fixed mediafile model. Fixed #1808. --- .../migrations/0002_auto_20160110_0103.py | 19 +++++++++++++++++++ openslides/mediafiles/models.py | 2 +- .../templates/mediafiles/mediafile-form.html | 1 - 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 openslides/mediafiles/migrations/0002_auto_20160110_0103.py diff --git a/openslides/mediafiles/migrations/0002_auto_20160110_0103.py b/openslides/mediafiles/migrations/0002_auto_20160110_0103.py new file mode 100644 index 000000000..267eea684 --- /dev/null +++ b/openslides/mediafiles/migrations/0002_auto_20160110_0103.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('mediafiles', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='mediafile', + name='title', + field=models.CharField(max_length=255, unique=True), + ), + ] diff --git a/openslides/mediafiles/models.py b/openslides/mediafiles/models.py index a59cd2177..485319279 100644 --- a/openslides/mediafiles/models.py +++ b/openslides/mediafiles/models.py @@ -18,7 +18,7 @@ class Mediafile(RESTModelMixin, models.Model): for more information. """ - title = models.CharField(max_length=255, unique=True, blank=True) + title = models.CharField(max_length=255, unique=True) """A string representing the title of the file.""" uploader = models.ForeignKey( diff --git a/openslides/mediafiles/static/templates/mediafiles/mediafile-form.html b/openslides/mediafiles/static/templates/mediafiles/mediafile-form.html index dd39c8934..8de05a479 100644 --- a/openslides/mediafiles/static/templates/mediafiles/mediafile-form.html +++ b/openslides/mediafiles/static/templates/mediafiles/mediafile-form.html @@ -27,7 +27,6 @@ Upload Successful - {{ errorMsg }} *required
File too large