From: Radek Czajka Date: Fri, 25 Sep 2020 12:58:02 +0000 (+0200) Subject: Cleaning some requirements. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/a64e6584c05481aa1f05bb7c9d3870b657016261 Cleaning some requirements. --- diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 1dfba26a9..587c192ec 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -13,8 +13,6 @@ libsasscompiler==0.1.5 jsmin fnp-django-pagination==2.2.3 -django-maintenancemode==0.11.3 -django-picklefield==1.1.0 django-modeltranslation==0.13 django-allauth==0.39 django-extensions==2.2.1 @@ -53,7 +51,7 @@ sorl-thumbnail==12.5.0 librarian==1.8.3 # celery tasks -celery[redis]==4.3.0 +celery[redis]==4.4.7 # OAI-PMH pyoai==2.5.0 diff --git a/src/waiter/migrations/0001_initial.py b/src/waiter/migrations/0001_initial.py index 90ce6e964..64d369d3e 100644 --- a/src/waiter/migrations/0001_initial.py +++ b/src/waiter/migrations/0001_initial.py @@ -2,7 +2,6 @@ # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.db import models, migrations -import picklefield.fields class Migration(migrations.Migration): @@ -17,7 +16,7 @@ class Migration(migrations.Migration): ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('path', models.CharField(unique=True, max_length=255, db_index=True)), ('task_id', models.CharField(db_index=True, max_length=128, null=True, blank=True)), - ('task', picklefield.fields.PickledObjectField(null=True, editable=False)), + ('task', models.TextField(null=True, editable=False)), ('description', models.CharField(max_length=255, null=True, blank=True)), ], options={ diff --git a/src/waiter/migrations/0002_remove_waitedfile_task.py b/src/waiter/migrations/0002_remove_waitedfile_task.py new file mode 100644 index 000000000..65a2033d4 --- /dev/null +++ b/src/waiter/migrations/0002_remove_waitedfile_task.py @@ -0,0 +1,17 @@ +# Generated by Django 2.2.16 on 2020-09-25 12:56 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('waiter', '0001_initial'), + ] + + operations = [ + migrations.RemoveField( + model_name='waitedfile', + name='task', + ), + ] diff --git a/src/waiter/models.py b/src/waiter/models.py index 09516a689..6de18d46a 100644 --- a/src/waiter/models.py +++ b/src/waiter/models.py @@ -6,13 +6,11 @@ from django.urls import reverse from django.db import models from waiter.settings import WAITER_URL, WAITER_MAX_QUEUE from waiter.utils import check_abspath -from picklefield import PickledObjectField class WaitedFile(models.Model): path = models.CharField(max_length=255, unique=True, db_index=True) task_id = models.CharField(max_length=128, db_index=True, null=True, blank=True) - task = PickledObjectField(null=True, editable=False) description = models.CharField(max_length=255, null=True, blank=True) @classmethod @@ -52,7 +50,7 @@ class WaitedFile(models.Model): if not already: waited, created = cls.objects.get_or_create(path=path) if created: - waited.task = task_creator(check_abspath(path), waited.pk) + task_creator(check_abspath(path), waited.pk) waited.task_id = waited.task.task_id waited.description = description waited.save() diff --git a/src/wolnelektury/settings/basic.py b/src/wolnelektury/settings/basic.py index bef8cd9d1..ed80feecd 100644 --- a/src/wolnelektury/settings/basic.py +++ b/src/wolnelektury/settings/basic.py @@ -6,7 +6,6 @@ from machina import MACHINA_MAIN_TEMPLATE_DIR from .paths import PROJECT_DIR DEBUG = True -MAINTENANCE_MODE = False ADMINS = [ # ('Your Name', 'your_email@domain.com'), @@ -77,7 +76,6 @@ MIDDLEWARE = [ 'django.contrib.admindocs.middleware.XViewMiddleware', 'fnp_django_pagination.middleware.PaginationMiddleware', 'django.middleware.locale.LocaleMiddleware', - 'maintenancemode.middleware.MaintenanceModeMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'fnpdjango.middleware.SetRemoteAddrFromXRealIP',