From 87bc673ee0460007519389942365b4d1f95f879d Mon Sep 17 00:00:00 2001 From: "Tomas \"Jethro\" Pokorny" Date: Mon, 29 Nov 2021 23:55:06 +0100 Subject: [PATCH] Seminar | bugfix po presunu mezi soubory --- seminar/migrations/0100_auto_20211129_2354.py | 19 +++++++++++++++++++ seminar/models/pomocne.py | 1 - seminar/models/tvorba.py | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 seminar/migrations/0100_auto_20211129_2354.py diff --git a/seminar/migrations/0100_auto_20211129_2354.py b/seminar/migrations/0100_auto_20211129_2354.py new file mode 100644 index 00000000..80906d4e --- /dev/null +++ b/seminar/migrations/0100_auto_20211129_2354.py @@ -0,0 +1,19 @@ +# Generated by Django 2.2.24 on 2021-11-29 22:54 + +from django.db import migrations, models +import seminar.models.tvorba + + +class Migration(migrations.Migration): + + dependencies = [ + ('seminar', '0099_auto_20210916_1509'), + ] + + operations = [ + migrations.AlterField( + model_name='cislo', + name='pdf', + field=models.FileField(blank=True, help_text='PDF čísla, které si mohou řešitelé stáhnout', null=True, storage=seminar.models.tvorba.OverwriteStorage(), upload_to=seminar.models.tvorba.cislo_pdf_filename, verbose_name='pdf'), + ), + ] diff --git a/seminar/models/pomocne.py b/seminar/models/pomocne.py index 16c46bf8..cb552a67 100644 --- a/seminar/models/pomocne.py +++ b/seminar/models/pomocne.py @@ -2,7 +2,6 @@ import logging import os from django.db import models -from django.core.files.storage import FileSystemStorage from .base import SeminarModelBase diff --git a/seminar/models/tvorba.py b/seminar/models/tvorba.py index 3e914efd..719375ff 100644 --- a/seminar/models/tvorba.py +++ b/seminar/models/tvorba.py @@ -12,6 +12,7 @@ from django.conf import settings from django.urls import reverse from django.core.cache import cache from django.core.exceptions import ObjectDoesNotExist, ValidationError +from django.core.files.storage import FileSystemStorage from django.utils.text import get_valid_filename from django.utils.functional import cached_property