-i https://py.mdrn.pl/simple
## Python libraries
-merge3==0.0.2
+merge3==0.0.8
PyYAML>=3.0
Pillow
oauth2
librarian==1.10
## Django
-Django==3.0.14
-fnpdjango==0.4.5
-django-pipeline==1.7.0 # +
-django-cas-ng==4.1.1 # +
-sorl-thumbnail==12.6.3 # +
+Django==3.1.13
+fnpdjango==0.5
+django-pipeline==2.0.5
+django-cas-ng==4.2.1
+sorl-thumbnail==12.7.0
django-maintenancemode>=0.9
fnp-django-pagination==2.2.4
-django-gravatar2==1.4.2
-django-extensions==2.1.6
-django-bootstrap4==1.1.1 # +
-libsasscompiler==0.1.5
-django-debug-toolbar==2.2 # +
+django-gravatar2==1.4.4
+django-extensions==3.1.3
+django-bootstrap4==3.0.1
+libsasscompiler==0.1.8
+django-debug-toolbar==3.2.1
django-admin-numeric-filter==0.1.6
sentry-sdk==0.12.2
--- /dev/null
+# Generated by Django 3.1.13 on 2021-07-06 01:30
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('documents', '0005_auto_20201102_1340'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='book',
+ name='_new_publishable',
+ field=models.BooleanField(editable=False, null=True),
+ ),
+ migrations.AlterField(
+ model_name='book',
+ name='_published',
+ field=models.BooleanField(editable=False, null=True),
+ ),
+ migrations.AlterField(
+ model_name='book',
+ name='_single',
+ field=models.BooleanField(db_index=True, editable=False, null=True),
+ ),
+ migrations.AlterField(
+ model_name='chunk',
+ name='_changed',
+ field=models.BooleanField(editable=False, null=True),
+ ),
+ migrations.AlterField(
+ model_name='chunk',
+ name='_hidden',
+ field=models.BooleanField(editable=False, null=True),
+ ),
+ migrations.AlterField(
+ model_name='chunk',
+ name='_new_publishable',
+ field=models.BooleanField(editable=False, null=True),
+ ),
+ migrations.AlterField(
+ model_name='image',
+ name='_changed',
+ field=models.BooleanField(editable=False, null=True),
+ ),
+ migrations.AlterField(
+ model_name='image',
+ name='_new_publishable',
+ field=models.BooleanField(editable=False, null=True),
+ ),
+ migrations.AlterField(
+ model_name='image',
+ name='_published',
+ field=models.BooleanField(editable=False, null=True),
+ ),
+ ]
parent_number = models.IntegerField(_('parent number'), null=True, blank=True, db_index=True, editable=False)
# Cache
- _single = models.NullBooleanField(editable=False, db_index=True)
- _new_publishable = models.NullBooleanField(editable=False)
- _published = models.NullBooleanField(editable=False)
+ _single = models.BooleanField(editable=False, null=True, db_index=True)
+ _new_publishable = models.BooleanField(editable=False, null=True)
+ _published = models.BooleanField(editable=False, null=True)
_on_track = models.IntegerField(null=True, blank=True, db_index=True, editable=False)
dc_cover_image = models.ForeignKey(Image, blank=True, null=True,
db_index=True, on_delete=models.SET_NULL, editable=False)
}
info = self.book_info()
- print(info)
if info is not None:
update['catalogue_book_id'] = info.url.slug
- print(info.url.slug)
if info.cover_source:
try:
image = Image.objects.get(pk=int(info.cover_source.rstrip('/').rsplit('/', 1)[-1]))
else:
if info.cover_source == image.get_full_url():
update['dc_cover_image'] = image
- print(update)
Book.objects.filter(pk=self.pk).update(**update)
def touch(self):
gallery_start = models.IntegerField(_('gallery start'), null=True, blank=True, default=1)
# cache
- _hidden = models.NullBooleanField(editable=False)
- _changed = models.NullBooleanField(editable=False)
- _new_publishable = models.NullBooleanField(editable=False)
+ _hidden = models.BooleanField(editable=False, null=True)
+ _changed = models.BooleanField(editable=False, null=True)
+ _new_publishable = models.BooleanField(editable=False, null=True)
# managers
objects = models.Manager()
project = models.ForeignKey(Project, models.SET_NULL, null=True, blank=True)
# cache
- _new_publishable = models.NullBooleanField(editable=False)
- _published = models.NullBooleanField(editable=False)
- _changed = models.NullBooleanField(editable=False)
+ _new_publishable = models.BooleanField(editable=False, null=True)
+ _published = models.BooleanField(editable=False, null=True)
+ _changed = models.BooleanField(editable=False, null=True)
class Meta:
app_label = 'documents'
from documents.test_utils import get_fixture
-from mock import patch
+from unittest.mock import patch
from django.test import TestCase
from django.contrib.auth.models import User
from documents.models import Book
'pipeline.finders.PipelineFinder',
)
-STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
+STATICFILES_STORAGE = 'pipeline.storage.PipelineManifestStorage'
PIPELINE = {
'CSS_COMPRESSOR': None,