+++ /dev/null
-syntax: glob
-
-local_settings.py
-lektury.sqlite
-wolnelektury/media/lektura/*
-*.pyc
-*.DS_Store
-localsettings.py
\ No newline at end of file
+++ /dev/null
-fa4bcbf759901d7444c98e3f0a3a9aa7da1b8a1b wolnelektury-1.0
--- /dev/null
+# -*- 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),
+ ),
+ ]
--- /dev/null
+# -*- 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),
+ ),
+ ]
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()
<!DOCTYPE html>
<html>
{% load static from staticfiles %}
- {% load i18n compressed %}
+ {% load i18n pipeline %}
{% load catalogue_tags %}
{% load thumbnail %}
<head>
<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 %}">
<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>
<!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" />
- {% compressed_css "book_text" %}
+ {% stylesheet "book_text" %}
{% block extrahead %}{% endblock %}
</head>
var LANGUAGE_CODE = "{{ LANGUAGE_CODE }}";
var STATIC_URL = "{{ STATIC_URL }}";
</script>
- {% compressed_js "book_text" %}
+ {% javascript "book_text" %}
{{ piwik_tag|safe }}
{% block extrabody %}{% endblock %}
'default': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'},
},
SOLR=settings.SOLR_TEST,
+ SSIFY_RENDER=False,
)
class WLTestCase(TestCase):
"""
from catalogue.tests.search import *
from catalogue.tests.tags import *
from catalogue.tests.templatetags import *
-from .test_visit import *
+from .visit import *
+++ /dev/null
-# -*- 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))
--- /dev/null
+# -*- 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))
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',
--- /dev/null
+# -*- 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),
+ ),
+ ]
--- /dev/null
+# -*- 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'),
+ ),
+ ]
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:
class NotesView(ListView):
def get_queryset(self):
- objects = Note.objects.select_related('book').all()
+ objects = Note.objects.all()
filters = {}
try:
--- /dev/null
+# -*- 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'),
+ ),
+ ]
--- /dev/null
+# -*- 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),
+ ),
+ ]
--- /dev/null
+# -*- 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'),
+ ),
+ ]
--- /dev/null
+# -*- 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'),
+ ),
+ ]
--- /dev/null
+# -*- 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),
+ ),
+ ]
--- /dev/null
+# -*- 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')]),
+ ),
+ ]
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'))
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
{% extends "catalogue/viewer_base.html" %}
{% load i18n %}
{% load static from staticfiles %}
-{% load compressed catalogue_tags %}
+{% load catalogue_tags %}
{% load thumbnail %}
--- /dev/null
+# -*- 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'),
+ ),
+ ]
--- /dev/null
+# -*- 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),
+ ),
+ ]
--- /dev/null
+# -*- 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),
+ ),
+ ]
--- /dev/null
+# -*- 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),
+ ),
+ ]
<!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 %}
<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>
<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 %}
<script src="{% static "js/contrib/modernizr.custom.19652.js" %}"></script>
</body>
</html>
-{% endspaceless %}
\ No newline at end of file
+{% endspaceless %}
{% spaceless %}
{% load static from staticfiles %}
-{% load compressed %}
+{% load pipeline %}
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<base target="_parent" />
<title>Widget Wolnych Lektur</title>
- {% compressed_css 'widget' %}
+ {% stylesheet 'widget' %}
</head>
<body>
<div id="wl">
</div>
-{% compressed_js 'widget' %}
+{% javascript 'widget' %}
</body>
</html>
-{% endspaceless %}
\ No newline at end of file
+{% endspaceless %}
-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
-i https://py.mdrn.pl:8443/simple/
# django
-Django>=1.7,<1.8
+Django>=1.8,<1.9
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
-jsonfield>=0.9.22,<1.0
+jsonfield>=1.0.3,<1.1
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
django-piwik
python-fb
-# Feedparser
+# Feedparser
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
# 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
## 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
--- /dev/null
+# -*- 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')]),
+ ),
+ ]
--- /dev/null
+# -*- 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)),
+ ],
+ ),
+ ]
'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 = [
MIGRATION_MODULES = {
'getpaid' : 'wolnelektury.migrations.getpaid',
+ 'piston' : 'wolnelektury.migrations.piston',
}
GETPAID_ORDER_DESCRIPTION = "{% load funding_tags %}{{ order|sanitize_payment_title }}"
# CSS and JavaScript file groups
-
-PIPELINE_CSS = {
+PIPELINE = {
+ 'STYLESHEETS': {
'main': {
# styles both for mobile and for big screen
'source_filenames': [
'source_filenames': ('scss/widget.scss',),
'output_filename': 'css/compressed/widget.css',
},
-}
-
-PIPELINE_JS = {
+ },
+ 'JAVASCRIPT': {
'base': {
'source_filenames': (
'js/contrib/jquery.cycle.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 = ''
+
+
+STATICFILES_FINDERS = [
+ 'django.contrib.staticfiles.finders.FileSystemFinder',
+ 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
+ 'pipeline.finders.PipelineFinder',
+]
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='/katalog/lektury/')),
+ url='/katalog/lektury/', permanent=False)),
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='/info/o-projekcie')),
+ url='/info/o-projekcie', permanent=True)),
url(r'^widget/$', RedirectView.as_view(
- url='/info/widget')),
+ url='/info/widget', permanent=True)),
url(r'^wolontariat/$', RedirectView.as_view(
- url='/info/mozesz-nam-pomoc/')),
+ url='/info/mozesz-nam-pomoc/', permanent=False)),
)