Django 1.8 and other updates.
authorRadek Czajka <rczajka@rczajka.pl>
Thu, 24 Dec 2015 12:23:01 +0000 (13:23 +0100)
committerRadek Czajka <rczajka@rczajka.pl>
Thu, 24 Dec 2015 12:23:01 +0000 (13:23 +0100)
39 files changed:
.hgignore [deleted file]
.hgtags [deleted file]
apps/api/migrations/0002_auto_20151221_1225.py [new file with mode: 0644]
apps/catalogue/migrations/0008_auto_20151221_1225.py [new file with mode: 0644]
apps/catalogue/models/book.py
apps/catalogue/templates/catalogue/player.html
apps/catalogue/templates/catalogue/viewer_base.html
apps/catalogue/test_utils.py
apps/catalogue/tests/__init__.py
apps/catalogue/tests/test_visit.py [deleted file]
apps/catalogue/tests/visit.py [new file with mode: 0644]
apps/catalogue/urls.py
apps/chunks/migrations/0003_auto_20151221_1225.py [new file with mode: 0644]
apps/dictionary/migrations/0004_auto_20151221_1225.py [new file with mode: 0644]
apps/dictionary/models.py
apps/dictionary/views.py
apps/funding/migrations/0002_auto_20151221_1225.py [new file with mode: 0644]
apps/infopages/migrations/0002_auto_20151221_1225.py [new file with mode: 0644]
apps/lesmianator/migrations/0002_auto_20151221_1225.py [new file with mode: 0644]
apps/libraries/migrations/0002_auto_20151221_1225.py [new file with mode: 0644]
apps/pdcounter/migrations/0002_auto_20151221_1225.py [new file with mode: 0644]
apps/picture/migrations/0006_auto_20151221_1225.py [new file with mode: 0644]
apps/picture/models.py
apps/picture/templates/picture/picture_viewer.html
apps/polls/migrations/0002_auto_20151221_1225.py [new file with mode: 0644]
apps/social/migrations/0002_auto_20151221_1225.py [new file with mode: 0644]
apps/sponsors/migrations/0002_auto_20151221_1225.py [new file with mode: 0644]
apps/suggest/migrations/0002_auto_20151221_1225.py [new file with mode: 0644]
apps/wolnelektury_core/templates/superbase.html
apps/wolnelektury_core/templates/widget.html
requirements-test.txt
requirements.txt
wolnelektury/migrations/getpaid/0002_auto_20151221_1225.py [new file with mode: 0644]
wolnelektury/migrations/piston/0001_initial.py [new file with mode: 0644]
wolnelektury/migrations/piston/__init__.py [new file with mode: 0644]
wolnelektury/settings/__init__.py
wolnelektury/settings/contrib.py
wolnelektury/settings/static.py
wolnelektury/urls.py

diff --git a/.hgignore b/.hgignore
deleted file mode 100644 (file)
index 3ea3b46..0000000
--- a/.hgignore
+++ /dev/null
@@ -1,8 +0,0 @@
-syntax: glob
-
-local_settings.py
-lektury.sqlite
-wolnelektury/media/lektura/*
-*.pyc
-*.DS_Store
-localsettings.py
\ No newline at end of file
diff --git a/.hgtags b/.hgtags
deleted file mode 100644 (file)
index 0edbce6..0000000
--- a/.hgtags
+++ /dev/null
@@ -1 +0,0 @@
-fa4bcbf759901d7444c98e3f0a3a9aa7da1b8a1b wolnelektury-1.0
diff --git a/apps/api/migrations/0002_auto_20151221_1225.py b/apps/api/migrations/0002_auto_20151221_1225.py
new file mode 100644 (file)
index 0000000..339068a
--- /dev/null
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('api', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='deleted',
+            name='slug',
+            field=models.SlugField(max_length=120, verbose_name='slug', blank=True),
+        ),
+    ]
diff --git a/apps/catalogue/migrations/0008_auto_20151221_1225.py b/apps/catalogue/migrations/0008_auto_20151221_1225.py
new file mode 100644 (file)
index 0000000..ba6c470
--- /dev/null
@@ -0,0 +1,255 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import jsonfield.fields
+import catalogue.fields
+import catalogue.models.bookmedia
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('catalogue', '0007_auto_20151123_1529'),
+    ]
+
+    operations = [
+        migrations.AlterModelOptions(
+            name='book',
+            options={'ordering': ('sort_key',), 'verbose_name': 'book', 'verbose_name_plural': 'books'},
+        ),
+        migrations.AlterModelOptions(
+            name='fragment',
+            options={'ordering': ('book', 'anchor'), 'verbose_name': 'fragment', 'verbose_name_plural': 'fragments'},
+        ),
+        migrations.AlterField(
+            model_name='book',
+            name='ancestor',
+            field=models.ManyToManyField(related_name='descendant', editable=False, to='catalogue.Book', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='book',
+            name='common_slug',
+            field=models.SlugField(max_length=120, verbose_name='slug'),
+        ),
+        migrations.AlterField(
+            model_name='book',
+            name='description',
+            field=models.TextField(verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='book',
+            name='extra_info',
+            field=jsonfield.fields.JSONField(default={}, verbose_name='extra information'),
+        ),
+        migrations.AlterField(
+            model_name='book',
+            name='parent_number',
+            field=models.IntegerField(default=0, verbose_name='parent number'),
+        ),
+        migrations.AlterField(
+            model_name='book',
+            name='slug',
+            field=models.SlugField(unique=True, max_length=120, verbose_name='slug'),
+        ),
+        migrations.AlterField(
+            model_name='book',
+            name='sort_key',
+            field=models.CharField(verbose_name='sort key', max_length=120, editable=False, db_index=True),
+        ),
+        migrations.AlterField(
+            model_name='book',
+            name='title',
+            field=models.CharField(max_length=32767, verbose_name='title'),
+        ),
+        migrations.AlterField(
+            model_name='bookmedia',
+            name='extra_info',
+            field=jsonfield.fields.JSONField(default={}, verbose_name='extra information', editable=False),
+        ),
+        migrations.AlterField(
+            model_name='bookmedia',
+            name='file',
+            field=catalogue.fields.OverwritingFileField(upload_to=catalogue.models.bookmedia._file_upload_to, max_length=600, verbose_name='file'),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='book_slugs',
+            field=models.TextField(verbose_name='book slugs'),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='description',
+            field=models.TextField(null=True, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='description_de',
+            field=models.TextField(null=True, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='description_en',
+            field=models.TextField(null=True, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='description_es',
+            field=models.TextField(null=True, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='description_fr',
+            field=models.TextField(null=True, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='description_it',
+            field=models.TextField(null=True, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='description_lt',
+            field=models.TextField(null=True, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='description_pl',
+            field=models.TextField(null=True, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='description_ru',
+            field=models.TextField(null=True, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='description_uk',
+            field=models.TextField(null=True, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='kind',
+            field=models.CharField(default=b'book', max_length=10, verbose_name='kind', db_index=True, choices=[(b'book', 'book'), (b'picture', b'picture')]),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='slug',
+            field=models.SlugField(max_length=120, serialize=False, verbose_name='slug', primary_key=True),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='title',
+            field=models.CharField(max_length=120, verbose_name='title', db_index=True),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='title_de',
+            field=models.CharField(max_length=120, null=True, verbose_name='title', db_index=True),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='title_en',
+            field=models.CharField(max_length=120, null=True, verbose_name='title', db_index=True),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='title_es',
+            field=models.CharField(max_length=120, null=True, verbose_name='title', db_index=True),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='title_fr',
+            field=models.CharField(max_length=120, null=True, verbose_name='title', db_index=True),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='title_it',
+            field=models.CharField(max_length=120, null=True, verbose_name='title', db_index=True),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='title_lt',
+            field=models.CharField(max_length=120, null=True, verbose_name='title', db_index=True),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='title_pl',
+            field=models.CharField(max_length=120, null=True, verbose_name='title', db_index=True),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='title_ru',
+            field=models.CharField(max_length=120, null=True, verbose_name='title', db_index=True),
+        ),
+        migrations.AlterField(
+            model_name='collection',
+            name='title_uk',
+            field=models.CharField(max_length=120, null=True, verbose_name='title', db_index=True),
+        ),
+        migrations.AlterField(
+            model_name='tag',
+            name='category',
+            field=models.CharField(db_index=True, max_length=50, verbose_name='category', choices=[(b'author', 'author'), (b'epoch', 'epoch'), (b'kind', 'kind'), (b'genre', 'genre'), (b'theme', 'theme'), (b'set', 'set'), (b'thing', 'thing')]),
+        ),
+        migrations.AlterField(
+            model_name='tag',
+            name='description',
+            field=models.TextField(verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='tag',
+            name='description_de',
+            field=models.TextField(null=True, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='tag',
+            name='description_en',
+            field=models.TextField(null=True, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='tag',
+            name='description_es',
+            field=models.TextField(null=True, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='tag',
+            name='description_fr',
+            field=models.TextField(null=True, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='tag',
+            name='description_it',
+            field=models.TextField(null=True, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='tag',
+            name='description_lt',
+            field=models.TextField(null=True, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='tag',
+            name='description_pl',
+            field=models.TextField(null=True, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='tag',
+            name='description_ru',
+            field=models.TextField(null=True, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='tag',
+            name='description_uk',
+            field=models.TextField(null=True, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='tag',
+            name='slug',
+            field=models.SlugField(max_length=120, verbose_name='slug'),
+        ),
+        migrations.AlterField(
+            model_name='tag',
+            name='sort_key',
+            field=models.CharField(max_length=120, verbose_name='sort key', db_index=True),
+        ),
+    ]
index bfc9ec4..5f68e09 100644 (file)
@@ -71,7 +71,7 @@ class Book(models.Model):
 
     parent = models.ForeignKey('self', blank=True, null=True,
         related_name='children')
 
     parent = models.ForeignKey('self', blank=True, null=True,
         related_name='children')
-    ancestor = models.ManyToManyField('self', blank=True, null=True,
+    ancestor = models.ManyToManyField('self', blank=True,
         editable=False, related_name='descendant', symmetrical=False)
 
     objects  = models.Manager()
         editable=False, related_name='descendant', symmetrical=False)
 
     objects  = models.Manager()
index 507e5d5..701fbe8 100755 (executable)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
     {% load static from staticfiles %}
 <!DOCTYPE html>
 <html>
     {% load static from staticfiles %}
-    {% load i18n compressed %}
+    {% load i18n pipeline %}
     {% load catalogue_tags %}
     {% load thumbnail %}
     <head>
     {% load catalogue_tags %}
     {% load thumbnail %}
     <head>
@@ -11,8 +11,8 @@
         <title>{% trans "Wolne Lektury" %} ::
             {{ book.title }} - {{ audiobook }}</title>
         <link rel="icon" href="{% static "img/favicon.png" %}" type="image/png" />
         <title>{% trans "Wolne Lektury" %} ::
             {{ book.title }} - {{ audiobook }}</title>
         <link rel="icon" href="{% static "img/favicon.png" %}" type="image/png" />
-        {% compressed_css "all" %}
-        {% compressed_css "player" %}
+        {% stylesheet "all" %}
+        {% stylesheet "player" %}
 
     </head>
     <body id="{% block bodyid %}player{% endblock %}">
 
     </head>
     <body id="{% block bodyid %}player{% endblock %}">
 
 
         <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
 
 
         <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
-        {% compressed_js "player" %}
+        {% javascript "player" %}
 
         {{ piwik_tag|safe }}
     </body>
 
         {{ piwik_tag|safe }}
     </body>
index 1b4a92b..416b9de 100644 (file)
@@ -1,14 +1,14 @@
 <!DOCTYPE html>
 {% load i18n %}
 {% load static from staticfiles %}
 <!DOCTYPE html>
 {% load i18n %}
 {% load static from staticfiles %}
-{% load compressed %}
+{% load pipeline %}
 <html class="no-js">
     <head>
         <meta charset="utf-8">
         <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
         <title>{% block title %}{% endblock %} :: {% trans "Wolne Lektury" %}</title>
         <link rel="icon" href="{% static "img/favicon.png" %}" type="image/x-icon" />
 <html class="no-js">
     <head>
         <meta charset="utf-8">
         <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
         <title>{% block title %}{% endblock %} :: {% trans "Wolne Lektury" %}</title>
         <link rel="icon" href="{% static "img/favicon.png" %}" type="image/x-icon" />
-        {% compressed_css "book_text" %}
+        {% stylesheet "book_text" %}
         {% block extrahead %}{% endblock %}
 
     </head>
         {% block extrahead %}{% endblock %}
 
     </head>
@@ -65,7 +65,7 @@
             var LANGUAGE_CODE = "{{ LANGUAGE_CODE }}";
             var STATIC_URL = "{{ STATIC_URL }}";
         </script>
             var LANGUAGE_CODE = "{{ LANGUAGE_CODE }}";
             var STATIC_URL = "{{ STATIC_URL }}";
         </script>
-        {% compressed_js "book_text" %}
+        {% javascript "book_text" %}
 
         {{ piwik_tag|safe }}
         {% block extrabody %}{% endblock %}
 
         {{ piwik_tag|safe }}
         {% block extrabody %}{% endblock %}
index 101a508..9d87311 100644 (file)
@@ -21,6 +21,7 @@ from django.conf import settings
             'default': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'},
         },
     SOLR=settings.SOLR_TEST,
             'default': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'},
         },
     SOLR=settings.SOLR_TEST,
+    SSIFY_RENDER=False,
 )
 class WLTestCase(TestCase):
     """
 )
 class WLTestCase(TestCase):
     """
index 79aed52..9c41af2 100644 (file)
@@ -8,4 +8,4 @@ from catalogue.tests.cover import *
 from catalogue.tests.search import *
 from catalogue.tests.tags import *
 from catalogue.tests.templatetags import *
 from catalogue.tests.search import *
 from catalogue.tests.tags import *
 from catalogue.tests.templatetags import *
-from .test_visit import *
+from .visit import *
diff --git a/apps/catalogue/tests/test_visit.py b/apps/catalogue/tests/test_visit.py
deleted file mode 100644 (file)
index 1bdbdbd..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-# -*- coding: utf-8 -*-
-# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
-# Copyright Â© Fundacja Nowoczesna Polska. See NOTICE for more information.
-#
-from catalogue import models
-from catalogue.test_utils import BookInfoStub, PersonStub, WLTestCase, info_args
-from django.core.files.base import ContentFile
-
-
-class VisitTest(WLTestCase):
-    """Simply create some objects and visit some views."""
-
-    def setUp(self):
-        WLTestCase.setUp(self)
-        author = PersonStub(("Jane",), "Doe")
-        book_info = BookInfoStub(author=author, genre="Genre",
-            epoch='Epoch', kind="Kind", **info_args(u"A book"))
-        self.book = models.Book.from_text_and_meta(ContentFile('''
-            <utwor>
-            <opowiadanie>
-                <akap>
-                    <begin id="b1" />
-                    <motyw id="m1">Theme</motyw>
-                    Test
-                    <end id="e1" />
-                </akap>
-            </opowiadanie>
-            </utwor>
-            '''), book_info)
-        self.collection = models.Collection.objects.create(
-            title='Biblioteczka Boya', slug='boy', book_slugs='a-book')
-
-    def test_visit_urls(self):
-        """ book description should return authors, ancestors, book """
-        url_map = {
-            200: [
-                '',
-                'lektury/',
-                'lektury/boy/',
-                'nowe/',
-                'lektura/a-book/',
-                'lektura/a-book.html',
-                'lektura/a-book/motyw/theme/',
-                'motyw/theme/',
-                'autor/jane-doe/',
-                'autor/jane-doe/gatunek/genre/',
-                'autor/jane-doe/gatunek/genre/motyw/theme/',
-                'pl.json',
-                'b/%d/mini.pl.html' % self.book.pk,
-                'b/%d/mini_nolink.pl.html' % self.book.pk,
-                'b/%d/short.pl.html' % self.book.pk,
-                'b/%d/wide.pl.html' % self.book.pk,
-                'f/%d/promo.pl.html' % self.book.fragments.all()[0].pk,
-                'f/%d/short.pl.html' % self.book.fragments.all()[0].pk,
-                ],
-            404: [
-                'lektury/nonexistent/',  # Nonexistent Collection.
-                'lektura/nonexistent/',  # Nonexistent Book.
-                'lektura/nonexistent.html',  # Nonexistent Book's HTML.
-                'lektura/nonexistent/motyw/theme/',  # Nonexistent Book's theme.
-                'lektura/a-book/motyw/nonexistent/',  # Nonexistent theme in a Book.
-                'autor/nonexistent/',  # Nonexistent author.
-                'motyw/nonexistent/',  # Nonexistent theme.
-                'zh.json',  # Nonexistent language.
-                'b/%d/mini.pl.html' % (self.book.pk + 100),  # Nonexistent book.
-                'b/%d/mini_nolink.pl.html' % (self.book.pk + 100),  # Nonexistent book.
-                'b/%d/short.pl.html' % (self.book.pk + 100),  # Nonexistent book.
-                'b/%d/wide.pl.html' % (self.book.pk + 100),  # Nonexistent book.
-                'f/%d/promo.pl.html' % (self.book.fragments.all()[0].pk + 100),  # Nonexistent fragment.
-                'f/%d/short.pl.html' % (self.book.fragments.all()[0].pk + 100),  # Nonexistent fragment.
-                ]
-            }
-        prefix = '/katalog/'
-        for expected_status, urls in url_map.items():
-            for url in urls:
-                status = self.client.get(prefix + url).status_code
-                self.assertEqual(status, expected_status,
-                    "Wrong status code for '%s'. Expected %d, got %d." % (
-                        prefix + url, expected_status, status))
diff --git a/apps/catalogue/tests/visit.py b/apps/catalogue/tests/visit.py
new file mode 100644 (file)
index 0000000..cab3c98
--- /dev/null
@@ -0,0 +1,80 @@
+# -*- coding: utf-8 -*-
+# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
+# Copyright Â© Fundacja Nowoczesna Polska. See NOTICE for more information.
+#
+from catalogue import models
+from catalogue.test_utils import BookInfoStub, PersonStub, WLTestCase, info_args
+from django.core.files.base import ContentFile
+
+
+class VisitTest(WLTestCase):
+    """Simply create some objects and visit some views."""
+
+    def setUp(self):
+        WLTestCase.setUp(self)
+        author = PersonStub(("Jane",), "Doe")
+        book_info = BookInfoStub(author=author, genre="Genre",
+            epoch='Epoch', kind="Kind", **info_args(u"A book"))
+        self.book = models.Book.from_text_and_meta(ContentFile('''
+            <utwor>
+            <opowiadanie>
+                <akap>
+                    <begin id="b1" />
+                    <motyw id="m1">Theme</motyw>
+                    Test
+                    <end id="e1" />
+                </akap>
+            </opowiadanie>
+            </utwor>
+            '''), book_info)
+        self.collection = models.Collection.objects.create(
+            title='Biblioteczka Boya', slug='boy', book_slugs='a-book')
+
+    def test_visit_urls(self):
+        """ book description should return authors, ancestors, book """
+        url_map = {
+            200: [
+                '',
+                'lektury/',
+                'lektury/boy/',
+                'nowe/',
+                'lektura/a-book/',
+                'lektura/a-book.html',
+                'lektura/a-book/motyw/theme/',
+                'motyw/theme/',
+                'autor/jane-doe/',
+                'autor/jane-doe/gatunek/genre/',
+                'autor/jane-doe/gatunek/genre/motyw/theme/',
+                'pl.json',
+                'b/%d/mini.pl.html' % self.book.pk,
+                'b/%d/mini_nolink.pl.html' % self.book.pk,
+                'b/%d/short.pl.html' % self.book.pk,
+                'b/%d/wide.pl.html' % self.book.pk,
+                'f/%d/promo.pl.html' % self.book.fragments.all()[0].pk,
+                'f/%d/short.pl.html' % self.book.fragments.all()[0].pk,
+                ],
+            404: [
+                'lektury/nonexistent/',  # Nonexistent Collection.
+                'lektura/nonexistent/',  # Nonexistent Book.
+                'lektura/nonexistent.html',  # Nonexistent Book's HTML.
+                'lektura/nonexistent/motyw/theme/',  # Nonexistent Book's theme.
+                'lektura/a-book/motyw/nonexistent/',  # Nonexistent theme in a Book.
+                'autor/nonexistent/',  # Nonexistent author.
+                'motyw/nonexistent/',  # Nonexistent theme.
+                'zh.json',  # Nonexistent language.
+                'b/%d/mini.pl.html' % (self.book.pk + 100),  # Nonexistent book.
+                'b/%d/mini_nolink.pl.html' % (self.book.pk + 100),  # Nonexistent book.
+                'b/%d/short.pl.html' % (self.book.pk + 100),  # Nonexistent book.
+                'b/%d/wide.pl.html' % (self.book.pk + 100),  # Nonexistent book.
+                'f/%d/promo.pl.html' % (self.book.fragments.all()[0].pk + 100),  # Nonexistent fragment.
+                'f/%d/short.pl.html' % (self.book.fragments.all()[0].pk + 100),  # Nonexistent fragment.
+                ]
+            }
+        prefix = '/katalog/'
+        for expected_status, urls in url_map.items():
+            for url in urls:
+                print(url)
+                status = self.client.get(prefix + url).status_code
+                self.assertEqual(status, expected_status,
+                    "Wrong status code for '%s'. Expected %d, got %d." % (
+                        prefix + url, expected_status, status))
index 6e98fb0..b7c59a0 100644 (file)
@@ -26,7 +26,7 @@ urlpatterns = patterns('picture.views',
 urlpatterns += patterns('',
     # old search page - redirected
     url(r'^szukaj/$', RedirectView.as_view(
 urlpatterns += patterns('',
     # old search page - redirected
     url(r'^szukaj/$', RedirectView.as_view(
-            url='/szukaj/', query_string=True)),
+            url='/szukaj/', query_string=True, permanent=True)),
 )
 
 urlpatterns += patterns('catalogue.views',
 )
 
 urlpatterns += patterns('catalogue.views',
diff --git a/apps/chunks/migrations/0003_auto_20151221_1225.py b/apps/chunks/migrations/0003_auto_20151221_1225.py
new file mode 100644 (file)
index 0000000..a7d7ca3
--- /dev/null
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('chunks', '0002_auto_20140911_1253'),
+    ]
+
+    operations = [
+        migrations.AlterModelOptions(
+            name='chunk',
+            options={'ordering': ('key',), 'verbose_name': 'chunk', 'verbose_name_plural': 'chunks'},
+        ),
+        migrations.AlterField(
+            model_name='chunk',
+            name='description',
+            field=models.CharField(max_length=255, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='chunk',
+            name='key',
+            field=models.CharField(help_text='A unique name for this chunk of content', max_length=255, serialize=False, verbose_name='key', primary_key=True),
+        ),
+    ]
diff --git a/apps/dictionary/migrations/0004_auto_20151221_1225.py b/apps/dictionary/migrations/0004_auto_20151221_1225.py
new file mode 100644 (file)
index 0000000..ee7252c
--- /dev/null
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('dictionary', '0003_auto_20141023_1445'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='note',
+            name='qualifiers',
+            field=models.ManyToManyField(to='dictionary.Qualifier'),
+        ),
+    ]
index d0d8b69..cc2b0ac 100644 (file)
@@ -28,7 +28,7 @@ class Note(models.Model):
     html = models.TextField()
     sort_key = models.CharField(max_length=128, db_index=True)
     fn_type = models.CharField(max_length=10, db_index=True)
     html = models.TextField()
     sort_key = models.CharField(max_length=128, db_index=True)
     fn_type = models.CharField(max_length=10, db_index=True)
-    qualifiers = models.ManyToManyField(Qualifier, null=True)
+    qualifiers = models.ManyToManyField(Qualifier)
     language = models.CharField(max_length=10, db_index=True)
 
     class Meta:
     language = models.CharField(max_length=10, db_index=True)
 
     class Meta:
index 40b36ba..69c6bf6 100755 (executable)
@@ -12,7 +12,7 @@ from .models import Note, Qualifier
 
 class NotesView(ListView):
     def get_queryset(self):
 
 class NotesView(ListView):
     def get_queryset(self):
-        objects = Note.objects.select_related('book').all()
+        objects = Note.objects.all()
         filters = {}
 
         try:
         filters = {}
 
         try:
diff --git a/apps/funding/migrations/0002_auto_20151221_1225.py b/apps/funding/migrations/0002_auto_20151221_1225.py
new file mode 100644 (file)
index 0000000..3224eb0
--- /dev/null
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('funding', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='funding',
+            name='email',
+            field=models.EmailField(db_index=True, max_length=254, verbose_name='email', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='offer',
+            name='description',
+            field=models.TextField(verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='offer',
+            name='slug',
+            field=models.SlugField(verbose_name='slug'),
+        ),
+        migrations.AlterField(
+            model_name='offer',
+            name='title',
+            field=models.CharField(max_length=255, verbose_name='title'),
+        ),
+    ]
diff --git a/apps/infopages/migrations/0002_auto_20151221_1225.py b/apps/infopages/migrations/0002_auto_20151221_1225.py
new file mode 100644 (file)
index 0000000..d5755e7
--- /dev/null
@@ -0,0 +1,69 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('infopages', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='infopage',
+            name='slug',
+            field=models.SlugField(unique=True, max_length=120, verbose_name='slug'),
+        ),
+        migrations.AlterField(
+            model_name='infopage',
+            name='title',
+            field=models.CharField(max_length=120, verbose_name='title', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='infopage',
+            name='title_de',
+            field=models.CharField(max_length=120, null=True, verbose_name='title', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='infopage',
+            name='title_en',
+            field=models.CharField(max_length=120, null=True, verbose_name='title', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='infopage',
+            name='title_es',
+            field=models.CharField(max_length=120, null=True, verbose_name='title', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='infopage',
+            name='title_fr',
+            field=models.CharField(max_length=120, null=True, verbose_name='title', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='infopage',
+            name='title_it',
+            field=models.CharField(max_length=120, null=True, verbose_name='title', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='infopage',
+            name='title_lt',
+            field=models.CharField(max_length=120, null=True, verbose_name='title', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='infopage',
+            name='title_pl',
+            field=models.CharField(max_length=120, null=True, verbose_name='title', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='infopage',
+            name='title_ru',
+            field=models.CharField(max_length=120, null=True, verbose_name='title', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='infopage',
+            name='title_uk',
+            field=models.CharField(max_length=120, null=True, verbose_name='title', blank=True),
+        ),
+    ]
diff --git a/apps/lesmianator/migrations/0002_auto_20151221_1225.py b/apps/lesmianator/migrations/0002_auto_20151221_1225.py
new file mode 100644 (file)
index 0000000..29a33a8
--- /dev/null
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import jsonfield.fields
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('lesmianator', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='poem',
+            name='created_from',
+            field=jsonfield.fields.JSONField(null=True, verbose_name='extra information', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='poem',
+            name='slug',
+            field=models.SlugField(max_length=120, verbose_name='slug'),
+        ),
+    ]
diff --git a/apps/libraries/migrations/0002_auto_20151221_1225.py b/apps/libraries/migrations/0002_auto_20151221_1225.py
new file mode 100644 (file)
index 0000000..123580d
--- /dev/null
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('libraries', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='catalog',
+            name='slug',
+            field=models.SlugField(unique=True, max_length=120, verbose_name='slug'),
+        ),
+        migrations.AlterField(
+            model_name='library',
+            name='description',
+            field=models.TextField(verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='library',
+            name='slug',
+            field=models.SlugField(max_length=120, unique=True, null=True, verbose_name='slug'),
+        ),
+    ]
diff --git a/apps/pdcounter/migrations/0002_auto_20151221_1225.py b/apps/pdcounter/migrations/0002_auto_20151221_1225.py
new file mode 100644 (file)
index 0000000..6447cc1
--- /dev/null
@@ -0,0 +1,58 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('pdcounter', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.AlterModelOptions(
+            name='bookstub',
+            options={'ordering': ('title',), 'verbose_name': 'book stub', 'verbose_name_plural': 'book stubs'},
+        ),
+        migrations.AlterField(
+            model_name='author',
+            name='death',
+            field=models.IntegerField(null=True, verbose_name='year of death', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='author',
+            name='description',
+            field=models.TextField(verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='author',
+            name='slug',
+            field=models.SlugField(unique=True, max_length=120, verbose_name='slug'),
+        ),
+        migrations.AlterField(
+            model_name='author',
+            name='sort_key',
+            field=models.CharField(max_length=120, verbose_name='sort key', db_index=True),
+        ),
+        migrations.AlterField(
+            model_name='bookstub',
+            name='pd',
+            field=models.IntegerField(null=True, verbose_name='goes to public domain', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='bookstub',
+            name='slug',
+            field=models.SlugField(unique=True, max_length=120, verbose_name='slug'),
+        ),
+        migrations.AlterField(
+            model_name='bookstub',
+            name='title',
+            field=models.CharField(max_length=120, verbose_name='title'),
+        ),
+        migrations.AlterField(
+            model_name='bookstub',
+            name='translator',
+            field=models.TextField(verbose_name='translator', blank=True),
+        ),
+    ]
diff --git a/apps/picture/migrations/0006_auto_20151221_1225.py b/apps/picture/migrations/0006_auto_20151221_1225.py
new file mode 100644 (file)
index 0000000..2f03ce5
--- /dev/null
@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import jsonfield.fields
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('picture', '0005_auto_20141022_1001'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='picture',
+            name='extra_info',
+            field=jsonfield.fields.JSONField(default={}, verbose_name='extra information'),
+        ),
+        migrations.AlterField(
+            model_name='picture',
+            name='slug',
+            field=models.SlugField(unique=True, max_length=120, verbose_name='slug'),
+        ),
+        migrations.AlterField(
+            model_name='picture',
+            name='sort_key',
+            field=models.CharField(verbose_name='sort key', max_length=120, editable=False, db_index=True),
+        ),
+        migrations.AlterField(
+            model_name='picture',
+            name='title',
+            field=models.CharField(max_length=32767, verbose_name='title'),
+        ),
+        migrations.AlterField(
+            model_name='picturearea',
+            name='kind',
+            field=models.CharField(db_index=True, max_length=10, verbose_name='kind', choices=[(b'thing', 'thing'), (b'theme', 'theme')]),
+        ),
+    ]
index ee2b4e0..5aabe3c 100644 (file)
@@ -150,7 +150,7 @@ class Picture(models.Model):
             xml_file = File(open(xml_file))
             close_xml_file = True
 
             xml_file = File(open(xml_file))
             close_xml_file = True
 
-        try:
+        with transaction.atomic():
             # use librarian to parse meta-data
             if image_store is None:
                 image_store = ImageStore(picture_storage.path('images'))
             # use librarian to parse meta-data
             if image_store is None:
                 image_store = ImageStore(picture_storage.path('images'))
@@ -240,18 +240,10 @@ class Picture(models.Model):
             picture.save()
             tasks.generate_picture_html(picture.id)
 
             picture.save()
             tasks.generate_picture_html(picture.id)
 
-        except Exception, ex:
-            logging.exception("Exception during import, rolling back")
-            transaction.rollback()
-            raise ex
-
-        finally:
-            if close_xml_file:
-                xml_file.close()
-            if close_image_file:
-                image_file.close()
-
-        transaction.commit()
+        if close_xml_file:
+            xml_file.close()
+        if close_image_file:
+            image_file.close()
 
         return picture
 
 
         return picture
 
index a1fb991..e169dbe 100644 (file)
@@ -1,7 +1,7 @@
 {% extends "catalogue/viewer_base.html" %}
 {% load i18n %}
 {% load static from staticfiles %}
 {% extends "catalogue/viewer_base.html" %}
 {% load i18n %}
 {% load static from staticfiles %}
-{% load compressed catalogue_tags %}
+{% load catalogue_tags %}
 {% load thumbnail %}
 
 
 {% load thumbnail %}
 
 
diff --git a/apps/polls/migrations/0002_auto_20151221_1225.py b/apps/polls/migrations/0002_auto_20151221_1225.py
new file mode 100644 (file)
index 0000000..e759488
--- /dev/null
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('polls', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='poll',
+            name='slug',
+            field=models.SlugField(verbose_name='slug'),
+        ),
+    ]
diff --git a/apps/social/migrations/0002_auto_20151221_1225.py b/apps/social/migrations/0002_auto_20151221_1225.py
new file mode 100644 (file)
index 0000000..f26e4f8
--- /dev/null
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('social', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='cite',
+            name='image_title',
+            field=models.CharField(max_length=255, null=True, verbose_name='title', blank=True),
+        ),
+    ]
diff --git a/apps/sponsors/migrations/0002_auto_20151221_1225.py b/apps/sponsors/migrations/0002_auto_20151221_1225.py
new file mode 100644 (file)
index 0000000..0110a88
--- /dev/null
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('sponsors', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='sponsor',
+            name='_description',
+            field=models.CharField(max_length=255, verbose_name='description', blank=True),
+        ),
+    ]
diff --git a/apps/suggest/migrations/0002_auto_20151221_1225.py b/apps/suggest/migrations/0002_auto_20151221_1225.py
new file mode 100644 (file)
index 0000000..126808b
--- /dev/null
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('suggest', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='publishingsuggestion',
+            name='books',
+            field=models.TextField(null=True, verbose_name='books', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='publishingsuggestion',
+            name='contact',
+            field=models.CharField(max_length=120, verbose_name='contact', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='suggestion',
+            name='contact',
+            field=models.CharField(max_length=120, verbose_name='contact', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='suggestion',
+            name='description',
+            field=models.TextField(verbose_name='description', blank=True),
+        ),
+    ]
index c3259a3..08d60a3 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 {% spaceless %}
 <html lang="{{ LANGUAGE_CODE }}" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
 <!DOCTYPE html>
 {% spaceless %}
 <html lang="{{ LANGUAGE_CODE }}" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
-    {% load compressed i18n %}
+    {% load pipeline i18n %}
     {% load static from staticfiles %}
     {% load catalogue_tags funding_tags reporting_stats %}
     {% load piwik_tags %}
     {% load static from staticfiles %}
     {% load catalogue_tags funding_tags reporting_stats %}
     {% load piwik_tags %}
@@ -21,7 +21,7 @@
         <title>{% block title %}{% trans "Wolne Lektury" %} :: {% block titleextra %}{% endblock %}{% endblock %}</title>
         <link rel="icon" href="{% static 'img/favicon.png' %}" type="image/png" />
         <link rel="search" type="application/opensearchdescription+xml" title="Wolne Lektury" href="{% static 'opensearch.xml' %}" />
         <title>{% block title %}{% trans "Wolne Lektury" %} :: {% block titleextra %}{% endblock %}{% endblock %}</title>
         <link rel="icon" href="{% static 'img/favicon.png' %}" type="image/png" />
         <link rel="search" type="application/opensearchdescription+xml" title="Wolne Lektury" href="{% static 'opensearch.xml' %}" />
-        {% compressed_css "main" %}
+        {% stylesheet "main" %}
         {% block extrahead %}
         {% endblock %}
     </head>
         {% block extrahead %}
         {% endblock %}
     </head>
 
         <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
         <script type="text/javascript">var LANGUAGE_CODE="{{ LANGUAGE_CODE }}"; var STATIC_URL="{{ STATIC_URL }}";</script>
 
         <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
         <script type="text/javascript">var LANGUAGE_CODE="{{ LANGUAGE_CODE }}"; var STATIC_URL="{{ STATIC_URL }}";</script>
-        {% compressed_js "base" %}
+        {% javascript "base" %}
 
         {% tracking_code %}
 
 
         {% tracking_code %}
 
         <script src="{% static "js/contrib/modernizr.custom.19652.js" %}"></script>
     </body>
 </html>
         <script src="{% static "js/contrib/modernizr.custom.19652.js" %}"></script>
     </body>
 </html>
-{% endspaceless %}
\ No newline at end of file
+{% endspaceless %}
index bfd0358..444f466 100644 (file)
@@ -1,7 +1,7 @@
 {% spaceless %}
 
 {% load static from staticfiles %}
 {% spaceless %}
 
 {% load static from staticfiles %}
-{% load compressed %}
+{% load pipeline %}
 
 <!DOCTYPE html>
 <html>
 
 <!DOCTYPE html>
 <html>
@@ -9,7 +9,7 @@
     <meta charset="UTF-8">
     <base target="_parent" />
     <title>Widget Wolnych Lektur</title>
     <meta charset="UTF-8">
     <base target="_parent" />
     <title>Widget Wolnych Lektur</title>
-    {% compressed_css 'widget' %}
+    {% stylesheet 'widget' %}
 </head>
 <body>
 <div id="wl">
 </head>
 <body>
 <div id="wl">
@@ -29,9 +29,9 @@
 
 </div>
 
 
 </div>
 
-{% compressed_js 'widget' %}
+{% javascript 'widget' %}
 
 </body>
 </html>
 
 
 </body>
 </html>
 
-{% endspaceless %}
\ No newline at end of file
+{% endspaceless %}
index e95f91a..063cd78 100644 (file)
@@ -1,7 +1,7 @@
 -i https://py.mdrn.pl:8443/simple/
 
 -i https://py.mdrn.pl:8443/simple/
 
-nose>=0.11
-django-nose
+nose>=1.3.7
+django-nose>=1.4.2,<1.5
 nosexcover
 polib
 mock
 nosexcover
 polib
 mock
index 7bed40f..fcd41c4 100644 (file)
@@ -1,19 +1,18 @@
 -i https://py.mdrn.pl:8443/simple/
 
 # django
 -i https://py.mdrn.pl:8443/simple/
 
 # django
-Django>=1.7,<1.8
+Django>=1.8,<1.9
 fnpdjango>=0.1.15,<0.2
 fnpdjango>=0.1.15,<0.2
-django-pipeline>=1.3,<1.4
+django-pipeline>=1.6,<1.7
 jsmin
 django-pagination>=1.0
 django-maintenancemode>=0.10
 django-piston==0.2.2.1.2
 jsmin
 django-pagination>=1.0
 django-maintenancemode>=0.10
 django-piston==0.2.2.1.2
-jsonfield>=0.9.22,<1.0
+jsonfield>=1.0.3,<1.1
 django-picklefield
 django-picklefield
-django-modeltranslation==0.8b2
-# django-allauth>=0.17,<0.18
-# django-allauth pre-0.18 version with Django 1.7 migrations
--e git+git://github.com/pennersr/django-allauth.git@9cc09402d3dd768bc1221e0bb7a438d6295812f5#egg=django-allauth
+django-modeltranslation>=0.10,<0.11
+django-allauth>=0.24,<0.25
+
 
 pytz
 
 
 pytz
 
@@ -24,12 +23,12 @@ python-memcached
 django-piwik
 python-fb
 
 django-piwik
 python-fb
 
-# Feedparser 
+# Feedparser
 Feedparser>=5.1
 
 Pillow
 mutagen>=1.17
 Feedparser>=5.1
 
 Pillow
 mutagen>=1.17
-sorl-thumbnail>=11.12.1b,<11.13
+sorl-thumbnail>=12.3,<12.4
 
 # home-brewed & dependencies
 lxml>=2.2.2
 
 # home-brewed & dependencies
 lxml>=2.2.2
@@ -39,7 +38,7 @@ lxml>=2.2.2
 
 # celery tasks
 celery>=3.1.12,<3.2
 
 # celery tasks
 celery>=3.1.12,<3.2
--e git+git://github.com/rczajka/kombu.git@4ed3622d1e801811410eda503e3eb8a6efd7f86f#egg=kombu
+kombu>=3.0.23,<3.1
 
 # spell checking
 pyenchant
 
 # spell checking
 pyenchant
@@ -50,7 +49,7 @@ pyoai
 ## egenix-mx-base  # Doesn't play nice with mx in dist-packages.
 sunburnt
 
 ## egenix-mx-base  # Doesn't play nice with mx in dist-packages.
 sunburnt
 
-django-getpaid>=1.6,<1.7
+django-getpaid>=1.7,<1.8
 httplib2
 Texml
 django-ssify>=0.2.1,<0.3
 httplib2
 Texml
 django-ssify>=0.2.1,<0.3
diff --git a/wolnelektury/migrations/getpaid/0002_auto_20151221_1225.py b/wolnelektury/migrations/getpaid/0002_auto_20151221_1225.py
new file mode 100644 (file)
index 0000000..c1a7177
--- /dev/null
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('getpaid', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='payment',
+            name='description',
+            field=models.CharField(max_length=128, null=True, verbose_name='description', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='payment',
+            name='status',
+            field=models.CharField(default=b'new', max_length=20, verbose_name='status', db_index=True, choices=[(b'new', 'new'), (b'in_progress', 'in progress'), (b'accepted_for_proc', 'accepted for processing'), (b'partially_paid', 'partially paid'), (b'paid', 'paid'), (b'cancelled', 'cancelled'), (b'failed', 'failed')]),
+        ),
+    ]
diff --git a/wolnelektury/migrations/piston/0001_initial.py b/wolnelektury/migrations/piston/0001_initial.py
new file mode 100644 (file)
index 0000000..c2939b1
--- /dev/null
@@ -0,0 +1,58 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+from django.conf import settings
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='Consumer',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('name', models.CharField(max_length=255)),
+                ('description', models.TextField()),
+                ('key', models.CharField(max_length=18)),
+                ('secret', models.CharField(max_length=32)),
+                ('status', models.CharField(default=b'pending', max_length=16, choices=[(b'pending', b'Pending approval'), (b'accepted', b'Accepted'), (b'canceled', b'Canceled')])),
+                ('user', models.ForeignKey(related_name='consumers', blank=True, to=settings.AUTH_USER_MODEL, null=True)),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Nonce',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('token_key', models.CharField(max_length=18)),
+                ('consumer_key', models.CharField(max_length=18)),
+                ('key', models.CharField(max_length=255)),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Resource',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('name', models.CharField(max_length=255)),
+                ('url', models.TextField(max_length=2047)),
+                ('is_readonly', models.BooleanField(default=True)),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Token',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('key', models.CharField(max_length=18)),
+                ('secret', models.CharField(max_length=32)),
+                ('token_type', models.IntegerField(choices=[(1, 'Request'), (2, 'Access')])),
+                ('timestamp', models.IntegerField()),
+                ('is_approved', models.BooleanField(default=False)),
+                ('consumer', models.ForeignKey(to='piston.Consumer')),
+                ('user', models.ForeignKey(related_name='tokens', blank=True, to=settings.AUTH_USER_MODEL, null=True)),
+            ],
+        ),
+    ]
diff --git a/wolnelektury/migrations/piston/__init__.py b/wolnelektury/migrations/piston/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
index 4f61940..9224484 100644 (file)
@@ -20,9 +20,6 @@ TEMPLATE_CONTEXT_PROCESSORS = (
     'django.core.context_processors.request',
     'wolnelektury_core.context_processors.extra_settings',
     'search.context_processors.search_form',
     'django.core.context_processors.request',
     'wolnelektury_core.context_processors.extra_settings',
     'search.context_processors.search_form',
-
-    "allauth.account.context_processors.account",
-    "allauth.socialaccount.context_processors.socialaccount",
 )
 
 MIDDLEWARE_CLASSES = [
 )
 
 MIDDLEWARE_CLASSES = [
index 3645c1d..f0e8430 100644 (file)
@@ -7,6 +7,7 @@ MODELTRANSLATION_PREPOPULATE_LANGUAGE = 'pl'
 
 MIGRATION_MODULES = {
     'getpaid' : 'wolnelektury.migrations.getpaid',
 
 MIGRATION_MODULES = {
     'getpaid' : 'wolnelektury.migrations.getpaid',
+    'piston' : 'wolnelektury.migrations.piston',
 }
 
 GETPAID_ORDER_DESCRIPTION = "{% load funding_tags %}{{ order|sanitize_payment_title }}"
 }
 
 GETPAID_ORDER_DESCRIPTION = "{% load funding_tags %}{{ order|sanitize_payment_title }}"
index ebce200..a5d7bb7 100644 (file)
@@ -15,8 +15,8 @@ STATIC_URL = '/static/'
 
 # CSS and JavaScript file groups
 
 
 # CSS and JavaScript file groups
 
-
-PIPELINE_CSS = {
+PIPELINE = {
+    'STYLESHEETS': {
     'main': {
         # styles both for mobile and for big screen
         'source_filenames': [
     'main': {
         # styles both for mobile and for big screen
         'source_filenames': [
@@ -70,9 +70,8 @@ PIPELINE_CSS = {
         'source_filenames': ('scss/widget.scss',),
         'output_filename': 'css/compressed/widget.css',
     },
         'source_filenames': ('scss/widget.scss',),
         'output_filename': 'css/compressed/widget.css',
     },
-}
-
-PIPELINE_JS = {
+    },
+    'JAVASCRIPT': {
     'base': {
         'source_filenames': (
             'js/contrib/jquery.cycle.min.js',
     'base': {
         'source_filenames': (
             'js/contrib/jquery.cycle.min.js',
@@ -149,19 +148,27 @@ PIPELINE_JS = {
         ),
         'output_filename': 'js/widget.min.js',
     },
         ),
         'output_filename': 'js/widget.min.js',
     },
+    },
+    'CSS_COMPRESSOR': None,
+    'JS_COMPRESSOR': 'pipeline.compressors.jsmin.JSMinCompressor',
+    'COMPILERS': (
+        'pipeline.compilers.sass.SASSCompiler',
+        # We could probably use PySCSS instead,
+        # but they have some serious problems, like:
+        # https://github.com/Kronuz/pyScss/issues/166 (empty list syntax)
+        # https://github.com/Kronuz/pyScss/issues/258 (bad @media order)
+        #'pyscss_compiler.PySCSSCompiler',
+    )
 }
 
 }
 
-STATICFILES_STORAGE = 'fnpdjango.utils.pipeline_storage.GzipPipelineCachedStorage'
-PIPELINE_CSS_COMPRESSOR = None
-PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.jsmin.JSMinCompressor'
-
-PIPELINE_COMPILERS = (
-    'pipeline.compilers.sass.SASSCompiler',
-    # We could probably use PySCSS instead,
-    # but they have some serious problems, like:
-    # https://github.com/Kronuz/pyScss/issues/166 (empty list syntax)
-    # https://github.com/Kronuz/pyScss/issues/258 (bad @media order)
-    #'pyscss_compiler.PySCSSCompiler',
-)
+#~ STATICFILES_STORAGE = 'fnpdjango.utils.pipeline_storage.GzipPipelineCachedStorage'
+
 #PIPELINE_PYSCSS_BINARY = '/usr/bin/env pyscss'
 #PIPELINE_PYSCSS_ARGUMENTS = ''
 #PIPELINE_PYSCSS_BINARY = '/usr/bin/env pyscss'
 #PIPELINE_PYSCSS_ARGUMENTS = ''
+
+
+STATICFILES_FINDERS = [
+    'django.contrib.staticfiles.finders.FileSystemFinder',
+    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
+    'pipeline.finders.PipelineFinder',
+]
index bdfb474..a77a3d1 100644 (file)
@@ -70,15 +70,15 @@ urlpatterns += patterns('',
 urlpatterns += patterns('',
     # old static pages - redirected
     url(r'^1procent/$', RedirectView.as_view(
 urlpatterns += patterns('',
     # old static pages - redirected
     url(r'^1procent/$', RedirectView.as_view(
-        url='http://nowoczesnapolska.org.pl/wesprzyj_nas/')),
+        url='http://nowoczesnapolska.org.pl/wesprzyj_nas/', permanent=True)),
     url(r'^epub/$', RedirectView.as_view(
     url(r'^epub/$', RedirectView.as_view(
-        url='/katalog/lektury/')),
+        url='/katalog/lektury/', permanent=False)),
     url(r'^mozesz-nam-pomoc/$', RedirectView.as_view(
     url(r'^mozesz-nam-pomoc/$', RedirectView.as_view(
-        url='/info/mozesz-nam-pomoc')),
+        url='/info/mozesz-nam-pomoc', permanent=True)),
     url(r'^o-projekcie/$', RedirectView.as_view(
     url(r'^o-projekcie/$', RedirectView.as_view(
-        url='/info/o-projekcie')),
+        url='/info/o-projekcie', permanent=True)),
     url(r'^widget/$', RedirectView.as_view(
     url(r'^widget/$', RedirectView.as_view(
-        url='/info/widget')),
+        url='/info/widget', permanent=True)),
     url(r'^wolontariat/$', RedirectView.as_view(
     url(r'^wolontariat/$', RedirectView.as_view(
-        url='/info/mozesz-nam-pomoc/')),
+        url='/info/mozesz-nam-pomoc/', permanent=False)),
 )
 )