-i https://py.mdrn.pl/simple/
# django
-Django==2.0.13
+Django==2.1.11
fnpdjango==0.4
django-pipeline==1.6.13
jsmin
djangorestframework==3.9.4
djangorestframework-xml
django-admin-ordering==0.10.0
-django-machina==0.7.1
+django-machina==1.0.2
oauthlib>=3.0.1,<3.1
list_display = ['nonempty_text', 'created_at', 'sticky', 'vip', 'small', 'has_image']
list_filter = ['group']
readonly_fields = ['created_at']
- raw_id_fields = ['book']
+ autocomplete_fields = ['book']
fieldsets = (
(None, {'fields': ('group', 'sticky', 'created_at', 'book')}),
(_('Content'), {'fields': ('link', 'vip', 'text', 'small')}),
'picture', 'picture_alt',
'picture_title', 'picture_author', 'picture_link',
'picture_license', 'picture_license_link'
-
- #'banner',
)}),
(
_('Background'),
{'fields': (
('background_plain', 'background_color'),
- 'image', 'image_shift',
- 'banner',
+ 'image',
'image_title', 'image_author', 'image_link',
'image_license', 'image_license_link'
)},
#
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-03-18 13:48+0100\n"
-"PO-Revision-Date: 2014-01-24 10:06+0100\n"
+"POT-Creation-Date: 2019-08-06 23:20+0200\n"
+"PO-Revision-Date: 2019-08-06 23:24+0200\n"
"Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
+"Language: pl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2);\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Generator: Poedit 2.0.6\n"
+"Language-Team: \n"
-#: admin.py:16
+#: admin.py:28
msgid "Content"
msgstr "Zawartość"
-#: admin.py:18
+#: admin.py:29
+msgid "Media box"
+msgstr ""
+
+#: admin.py:36
msgid "Background"
msgstr "Obraz tła"
-#: admin.py:29 models.py:32
+#: admin.py:50 models.py:40
msgid "text"
msgstr "tekst"
-#: admin.py:33 models.py:44
+#: admin.py:54
msgid "image"
msgstr "obraz"
-#: forms.py:22
+#: forms.py:21
msgid "Tags (comma-separated)"
msgstr "Tagi (rozdzielone przecinkami)"
-#: forms.py:45
+#: forms.py:44
msgid "Name of the new shelf"
msgstr "Nazwa nowej półki"
-#: models.py:14
+#: models.py:15
msgid "name"
-msgstr ""
+msgstr "nazwa"
-#: models.py:15 models.py:55
+#: models.py:16 models.py:67
msgid "created at"
msgstr "utworzone"
-#: models.py:19 models.py:101
+#: models.py:20 models.py:140
msgid "banner group"
msgstr "grupa bannerów"
-#: models.py:20
+#: models.py:21
msgid "banner groups"
msgstr "grupy bannerów"
-#: models.py:31
+#: models.py:39
msgid "book"
msgstr "książka"
-#: models.py:33
+#: models.py:41
msgid "small"
msgstr "mały"
-#: models.py:33
+#: models.py:41
msgid "Make this cite display smaller."
msgstr "Sprawia, że cytat wyświetla się mniejszym fontem."
-#: models.py:34
+#: models.py:42
msgid "VIP"
msgstr "VIP"
-#: models.py:35 models.py:51
+#: models.py:43
msgid "link"
msgstr "odnośnik"
-#: models.py:36
+#: models.py:44
msgid "video"
msgstr "wideo"
-#: models.py:37
+#: models.py:45
msgid "picture"
msgstr "ilustracja"
-#: models.py:39
+#: models.py:47
+msgid "picture alternative text"
+msgstr "alternatywny tekst ilustracji"
+
+#: models.py:48
+msgid "picture title"
+msgstr "tytuł ilustracji"
+
+#: models.py:49
+msgid "picture author"
+msgstr "autor ilustracji"
+
+#: models.py:50
+msgid "picture link"
+msgstr "link ilustracji"
+
+#: models.py:51
+msgid "picture license name"
+msgstr "nazwa licencji ilustracji"
+
+#: models.py:52
+msgid "picture license link"
+msgstr "adres licencji ilustracji"
+
+#: models.py:54
msgid "sticky"
msgstr "przyklejony"
-#: models.py:40
+#: models.py:55
msgid "Sticky cites will take precedense."
msgstr "Przyklejone cytaty mają pierwszeństwo."
-#: models.py:41 models.py:60 models.py:100
-msgid "banner"
-msgstr "banner"
+#: models.py:56
+msgid "plain background"
+msgstr "jednobarwne tło"
-#: models.py:41
-msgid "Adjust size to image, ignore the text"
-msgstr "Dostosuj wielkość do obrazu tła, zignoruj tekst."
+#: models.py:57
+msgid "background color"
+msgstr "kolor tła"
-#: models.py:45
-msgid "Best image is exactly 975px wide and weights under 100kB."
-msgstr "Najlepszy obraz ma szerokość 975px i waży poniżej 100kB."
+#: models.py:59
+msgid "background image"
+msgstr "obraz tła"
-#: models.py:47
-msgid "shift"
-msgstr "przesunięcie"
+#: models.py:60
+msgid "Best background is 975 x 315 px and under 100kB."
+msgstr "Najlepsze tło ma wielkość 975 x 315 px i waży poniżej 100kB."
-#: models.py:48
-msgid ""
-"Vertical shift, in percents. 0 means top, 100 is bottom. Default is 50%."
-msgstr ""
-"Przesunięcie w pionie, w procentach. 0 to wyrównanie do górnej krawędzi, 100 "
-"do dolnej. Domyślne jest 50%."
+#: models.py:61
+msgid "background title"
+msgstr "tytuł obrazu tła"
-#: models.py:49
-msgid "title"
-msgstr "tytuł"
+#: models.py:62
+msgid "background author"
+msgstr "autor obrazu tła"
-#: models.py:50
-msgid "author"
-msgstr "autor"
+#: models.py:63
+msgid "background link"
+msgstr "link obrazu tła"
-#: models.py:52
-msgid "license name"
-msgstr "nazwa licencji"
+#: models.py:64
+msgid "background license name"
+msgstr "nazwa licencji obrazu tła"
-#: models.py:53
-msgid "license link"
-msgstr "adres licencji"
+#: models.py:65
+msgid "background license link"
+msgstr "adres licencji obrazu tła"
-#: models.py:56
+#: models.py:68
msgid "group"
msgstr "grupa"
-#: models.py:61
+#: models.py:72 models.py:139
+msgid "banner"
+msgstr "banner"
+
+#: models.py:73
msgid "banners"
msgstr "bannery"
-#: models.py:87
+#: models.py:126
msgid "slug"
msgstr "slug"
-#: models.py:91 models.py:99
+#: models.py:130 models.py:138
msgid "carousel"
msgstr "karuzela"
-#: models.py:92
+#: models.py:131
msgid "carousels"
msgstr "karuzele"
-#: models.py:98
+#: models.py:137
msgid "order"
msgstr "kolejność"
-#: models.py:106
+#: models.py:145
msgid "carousel item"
msgstr "element karuzeli"
-#: models.py:107
+#: models.py:146
msgid "carousel items"
msgstr "elementy karuzeli"
-#: models.py:114 models.py:116
+#: models.py:153 models.py:155
msgid "Either banner or banner group is required."
msgstr "Proszę wskazać banner albo grupę bannerów."
-#: templates/social/cite_promo.html:14
+#: templates/social/cite_promo.html:23
msgid "recommends"
msgstr "poleca"
"na stronie utworu. Po jej zaznaczeniu publikacja pojawi się w zakładce Moja "
"półka."
-#: templates/social/sets_form.html:8
+#: templates/social/sets_form.html:7
msgid "Remove from my shelf"
msgstr "Usuń z mojej półki"
+#~ msgid "Adjust size to image, ignore the text"
+#~ msgstr "Dostosuj wielkość do obrazu tła, zignoruj tekst."
+
+#~ msgid "shift"
+#~ msgstr "przesunięcie"
+
+#~ msgid ""
+#~ "Vertical shift, in percents. 0 means top, 100 is bottom. Default is 50%."
+#~ msgstr ""
+#~ "Przesunięcie w pionie, w procentach. 0 to wyrównanie do górnej krawędzi, "
+#~ "100 do dolnej. Domyślne jest 50%."
+
+#~ msgid "title"
+#~ msgstr "tytuł"
+
+#~ msgid "author"
+#~ msgstr "autor"
+
#~ msgid "cite"
#~ msgstr "cytat"
--- /dev/null
+# Generated by Django 2.1.11 on 2019-08-07 08:56
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('social', '0010_cite_background_plain'),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name='cite',
+ name='banner',
+ ),
+ migrations.RemoveField(
+ model_name='cite',
+ name='image_shift',
+ ),
+ migrations.AlterField(
+ model_name='cite',
+ name='image',
+ field=models.ImageField(blank=True, help_text='Best background is 975 x 315 px and under 100kB.', null=True, upload_to='social/cite', verbose_name='background image'),
+ ),
+ migrations.AlterField(
+ model_name='cite',
+ name='image_author',
+ field=models.CharField(blank=True, max_length=255, null=True, verbose_name='background author'),
+ ),
+ migrations.AlterField(
+ model_name='cite',
+ name='image_license',
+ field=models.CharField(blank=True, max_length=255, null=True, verbose_name='background license name'),
+ ),
+ migrations.AlterField(
+ model_name='cite',
+ name='image_license_link',
+ field=models.URLField(blank=True, null=True, verbose_name='background license link'),
+ ),
+ migrations.AlterField(
+ model_name='cite',
+ name='image_link',
+ field=models.URLField(blank=True, null=True, verbose_name='background link'),
+ ),
+ migrations.AlterField(
+ model_name='cite',
+ name='image_title',
+ field=models.CharField(blank=True, max_length=255, null=True, verbose_name='background title'),
+ ),
+ migrations.AlterField(
+ model_name='cite',
+ name='picture',
+ field=models.ImageField(blank=True, help_text='Najlepsze wymiary: 975 x 315 z tekstem, 487 x 315 bez tekstu.', upload_to='', verbose_name='picture'),
+ ),
+ ]
sticky = models.BooleanField(_('sticky'), default=False, db_index=True,
help_text=_('Sticky cites will take precedense.'))
- banner = models.BooleanField(_('banner'), default=False, help_text=
- 'Dostosuj wielkość do obrazu tła, zignoruj tekst.'
- '<br>(Przestarzałe; użyj funkcji "Obraz" w sekcji "Media box")')
-
background_plain = models.BooleanField(_('plain background'), default=False)
background_color = models.CharField(_('background color'), max_length=32, blank=True)
image = models.ImageField(
- _('image'), upload_to='social/cite', null=True, blank=True,
- help_text=_('Best image is exactly 975px wide and weights under 100kB.'))
- image_shift = models.IntegerField(
- _('shift'), null=True, blank=True,
- help_text='Przesunięcie w pionie, w procentach. 0 to wyrównanie do górnej krawędzi, 100 do dolnej. Domyślne jest 50%.'
- '<br>(Przestarzałe; użyj obrazka o właściwych proporcjach;)')
- image_title = models.CharField(_('title'), max_length=255, null=True, blank=True)
- image_author = models.CharField(_('author'), max_length=255, blank=True, null=True)
- image_link = models.URLField(_('link'), blank=True, null=True)
- image_license = models.CharField(_('license name'), max_length=255, blank=True, null=True)
- image_license_link = models.URLField(_('license link'), blank=True, null=True)
+ _('background image'), upload_to='social/cite', null=True, blank=True,
+ help_text=_('Best background is 975 x 315 px and under 100kB.'))
+ image_title = models.CharField(_('background title'), max_length=255, null=True, blank=True)
+ image_author = models.CharField(_('background author'), max_length=255, blank=True, null=True)
+ image_link = models.URLField(_('background link'), blank=True, null=True)
+ image_license = models.CharField(_('background license name'), max_length=255, blank=True, null=True)
+ image_license_link = models.URLField(_('background license link'), blank=True, null=True)
created_at = models.DateTimeField(_('created at'), auto_now_add=True)
group = models.ForeignKey(BannerGroup, verbose_name=_('group'), null=True, blank=True, on_delete=models.SET_NULL)
return self.vip or self.text or self.book
def layout(self):
- if self.banner:
- # TODO: move all banners to pictures.
- return 'banner'
pieces = []
if self.has_box():
pieces.append('box')
{% load embed_video from social_tags %}
{% if main %}
- <section class="big-cite"{% if cite.image or cite.background_plain %}{% if not cite.banner %} style="{% if cite.image %}background-image: url('{{ cite.image.url }}'); background-position: 50% {{ cite.image_shift|default_if_none:50 }}%;{% else %}background-image: none; background-color: {{ cite.background_color|default:"#000000" }};{% endif %}"{% endif %}{% endif %} {% if cite.banner %}class="banner"{% endif %}>
+ <section class="big-cite"{% if cite.image or cite.background_plain %} style="{% if cite.image %}background-image: url('{{ cite.image.url }}');{% else %}background-image: none; background-color: {{ cite.background_color|default:"#000000" }};{% endif %}"{% endif %}>
{% endif %}
{% if cite %}
<a href="{{ cite.link }}" class="cite-{{ cite.layout }}">
- {% if cite.banner %}
- {# Obsolete #}
- <img src="{{ cite.image.url }}" width="100%"/>
- {% else %}
{% if cite.video %}
<div class="box-c">
{% embed_video cite.video %}
<p class="source mono"><span>{{ cite.book.pretty_title }}</span></p>
{% endif %}
</div>
- {% endif %}
</a>
{% endif %}
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
-
-from machina import get_apps as get_machina_apps
+#
INSTALLED_APPS_OUR = [
'wolnelektury',
'allauth.socialaccount.providers.google',
# 'allauth.socialaccount.providers.twitter',
- # Machina related apps:
+ # Machina dependencies:
'mptt',
'haystack',
'widget_tweaks',
-] + get_machina_apps()
+
+ # Machina apps:
+ 'machina',
+ 'machina.apps.forum',
+ 'machina.apps.forum_conversation',
+ 'machina.apps.forum_conversation.forum_attachments',
+ 'machina.apps.forum_conversation.forum_polls',
+ 'machina.apps.forum_feeds',
+ 'machina.apps.forum_moderation',
+ 'machina.apps.forum_search',
+ 'machina.apps.forum_tracking',
+ 'machina.apps.forum_member',
+ 'machina.apps.forum_permission',
+]
INSTALLED_APPS = INSTALLED_APPS_OUR + INSTALLED_APPS_CONTRIB
],
'output_filename': 'css/compressed/book_text.css',
},
+ 'forum': {
+ 'source_filenames': [
+ 'scss/forum.scss',
+ ],
+ 'output_filename': 'css/compressed/compressed/forum.css',
+ },
'picture': {
'source_filenames': [
'css/master.book.css',
--- /dev/null
+.navbar {
+ .navbar-brand {
+ padding-top: 0;
+ padding-bottom: 0;
+ margin-top: -2px;
+ margin-bottom: -2px;
+ }
+}
padding: 0;
margin: 0;
background-size: cover;
- background-position: 50% 68%;
+ background-position: 50% 50%;
- background-image: url(/static/img/backdrop/book-drawer2.jpg);
-
- &.banner {
- background: none;
- }
+ background-image: url(/static/img/backdrop/book-drawer-315.jpg);
.cite-box, .cite-box-text, .cite-text {
box-sizing: border-box;
-{% extends "board_base.html" %}
+{% extends 'board_base.html' %}
{% load i18n %}
+{% load static %}
+{% load stylesheet from pipeline %}
+
+{% block css %}
+ {{ block.super }}
+ {% stylesheet 'forum' %}
+{% endblock css %}
+
+
{% block header %}
+<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
+ <a class="navbar-brand" href="{% url 'forum:index' %}">
+ {% block brand %}
+ <img src="{% static 'img/logo-neon-transp.png' %}" alt="Towarzystwo Przyjaciół Wolnych Lektur">
+ {% endblock %}
+ </a>
-<div class="navbar-fixed-top-spacing"> </div>
-<div class="navbar navbar-default navbar-fixed-top machina-navbar" role="navigation" style="background:black; color: white;">
- <div class="container">
- <div class="navbar-header">
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
- <span class="sr-only">Toggle navigation</span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <a class="" href="/"><img src="https://static.wolnelektury.pl/img/logo-neon.71fa40570160.png" alt="Towarzystwo Przyjaciół Wolnych Lektur" style="height:50px"></a>
+ <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
+ <span class="navbar-toggler-icon"></span>
+ </button>
+ <div class="collapse navbar-collapse" id="navbarSupportedContent">
+ {% block header_collapse %}
+ <form class="form-inline my-2 ml-3 my-lg-0" role="search" action="{% url 'forum_search:search' %}">
+ <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search" name="q">
+ <button class="btn btn-outline-light my-2 my-sm-0" type="submit">{% trans "Search" %}</button>
+ </form>
+ <div class="navbar-nav mr-auto">
+ <a class="nav-item nav-link" href="{% url 'forum_search:search' %}">{% trans "Advanced search" %}</a>
</div>
- <div class="collapse navbar-collapse">
- {% block header_collapse %}
- <div class="col-sm-7 col-md-8 col-lg-7">
- <form class="navbar-form form-inline" role="search" action="{% url 'forum_search:search' %}">
- <div class="form-group col-sm-6 col-md-7">
- <div class="input-group">
- <input type="text" class="form-control" placeholder="{% trans 'Search...' %}" name="q">
- <div class="input-group-btn">
- <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
- </div>
- </div>
- </div>
- <div class="form-group col-sm-5">
- <a href="{% url 'forum_search:search' %}" class="btn btn-link">{% trans "Advanced search" %}</a>
- </div>
- </form>
- </div>
-
- <div class="col-sm-3 col-md-2 col-lg-2 navbar-right">
- <div style="padding: 1em">
- {{ user }}
- </div>
- </div>
- {% endblock header_collapse %}
+ <div class="navbar-nav mr-auto">
+ {% if request.user.is_authenticated %}
+ <div class="nav-item">
+ <a class="nav-link disabled">
+ {{ request.user.username }}
+ </a>
+ </div>
+ {% if request.user.is_staff %}
+ <div class="nav-item">
+ <a class="nav-link" href="{% url 'admin:index' %}">
+ {% trans "Administration" %}
+ </a>
+ </div>
+ {% endif %}
+ <div class="nav-item">
+ <a class="nav-link" href="{% url 'logout' %}">{% trans "Logout" %}</a>
+ </div>
+ {% endif %}
</div>
+ {% endblock header_collapse %}
</div>
-</div>
-
-
-
+</nav>
{% endblock header %}
from django.contrib import admin
from django.views.generic import RedirectView
import django.views.static
-from machina.app import board
import catalogue.views
import picture.views
from . import views
url(r'^szukaj/', include('search.urls')),
url(r'^i18n/', include('django.conf.urls.i18n')),
- url(r'^forum/', include(board.urls)),
+ url(r'^forum/', include('machina.urls')),
]
urlpatterns += [