From: Radek Czajka Date: Wed, 2 Oct 2019 11:22:37 +0000 (+0200) Subject: Some housekeeping X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/c48ff2d3e64065793c24cfb8ae151f02b8e6646a?ds=inline;hp=-c Some housekeeping --- c48ff2d3e64065793c24cfb8ae151f02b8e6646a diff --git a/src/apiclient/__init__.py b/src/apiclient/__init__.py index 5eee2fdc..36cd7ec7 100644 --- a/src/apiclient/__init__.py +++ b/src/apiclient/__init__.py @@ -1,7 +1,9 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# import json -import oauth2 from urllib.parse import urlencode - +import oauth2 from apiclient.settings import WL_CONSUMER_KEY, WL_CONSUMER_SECRET, WL_API_URL, BETA_API_URL @@ -31,12 +33,12 @@ def api_call(user, path, data=None, beta=False): data = json.dumps(data) data = urlencode({"data": data}) resp, content = client.request( - "%s%s" % (api_url, path), - method="POST", - body=data) + "%s%s" % (api_url, path), + method="POST", + body=data) else: resp, content = client.request( - "%s%s" % (api_url, path)) + "%s%s" % (api_url, path)) status = resp['status'] if status == '200': @@ -47,4 +49,3 @@ def api_call(user, path, data=None, beta=False): raise ApiError('User not authorized for publishing.') else: raise ApiError("WL API call error %s, path: %s" % (status, path)) - diff --git a/src/apiclient/migrations/0001_initial.py b/src/apiclient/migrations/0001_initial.py index 88f51b7c..799b8cc3 100644 --- a/src/apiclient/migrations/0001_initial.py +++ b/src/apiclient/migrations/0001_initial.py @@ -1,6 +1,6 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.db import models, migrations from django.conf import settings diff --git a/src/apiclient/models.py b/src/apiclient/models.py index c750e6a6..898581d0 100644 --- a/src/apiclient/models.py +++ b/src/apiclient/models.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.db import models from django.contrib.auth.models import User @@ -17,5 +20,3 @@ class OAuthConnection(models.Model): o = cls(user=user, beta=beta) o.save() return o - - diff --git a/src/apiclient/settings.py b/src/apiclient/settings.py index 51b49069..2e446094 100755 --- a/src/apiclient/settings.py +++ b/src/apiclient/settings.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.conf import settings @@ -8,12 +11,15 @@ WL_API_URL = getattr(settings, 'APICLIENT_WL_API_URL', 'https://wolnelektury.pl/ BETA_API_URL = getattr(settings, 'APICLIENT_BETA_API_URL', 'http://dev.wolnelektury.pl/api/') -WL_REQUEST_TOKEN_URL = getattr(settings, 'APICLIENT_WL_REQUEST_TOKEN_URL', - WL_API_URL + 'oauth/request_token/') -WL_ACCESS_TOKEN_URL = getattr(settings, 'APICLIENT_WL_ACCESS_TOKEN_URL', - WL_API_URL + 'oauth/access_token/') -WL_AUTHORIZE_URL = getattr(settings, 'APICLIENT_WL_AUTHORIZE_URL', - WL_API_URL + 'oauth/authorize/') +WL_REQUEST_TOKEN_URL = getattr( + settings, 'APICLIENT_WL_REQUEST_TOKEN_URL', + WL_API_URL + 'oauth/request_token/') +WL_ACCESS_TOKEN_URL = getattr( + settings, 'APICLIENT_WL_ACCESS_TOKEN_URL', + WL_API_URL + 'oauth/access_token/') +WL_AUTHORIZE_URL = getattr( + settings, 'APICLIENT_WL_AUTHORIZE_URL', + WL_API_URL + 'oauth/authorize/') BETA_REQUEST_TOKEN_URL = BETA_API_URL + 'oauth/request_token/' BETA_ACCESS_TOKEN_URL = BETA_API_URL + 'oauth/access_token/' diff --git a/src/apiclient/urls.py b/src/apiclient/urls.py index 68cd1618..580a2c1b 100755 --- a/src/apiclient/urls.py +++ b/src/apiclient/urls.py @@ -1,4 +1,6 @@ -# -*- coding: utf-8 -*- +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.conf.urls import url from . import views diff --git a/src/apiclient/views.py b/src/apiclient/views.py index 8d0a7983..652cad6b 100644 --- a/src/apiclient/views.py +++ b/src/apiclient/views.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# import cgi from django.contrib.auth.decorators import login_required @@ -22,7 +25,7 @@ def oauth(request, beta=False): raise Exception("Invalid response %s." % resp['status']) request_token = dict(cgi.parse_qsl(content)) - + conn = OAuthConnection.get(request.user, beta) # this might reset existing auth! conn.access = False @@ -31,10 +34,10 @@ def oauth(request, beta=False): conn.save() url = "%s?oauth_token=%s&oauth_callback=%s" % ( - WL_AUTHORIZE_URL if not beta else BETA_AUTHORIZE_URL, - request_token['oauth_token'], - request.build_absolute_uri(reverse("apiclient_oauth_callback" if not beta else "apiclient_beta_callback")), - ) + WL_AUTHORIZE_URL if not beta else BETA_AUTHORIZE_URL, + request_token['oauth_token'], + request.build_absolute_uri(reverse("apiclient_oauth_callback" if not beta else "apiclient_beta_callback")), + ) return HttpResponseRedirect(url) @@ -49,7 +52,7 @@ def oauth_callback(request, beta=False): token = oauth2.Token(conn.token, conn.token_secret) token.set_verifier(oauth_verifier) client = oauth2.Client(wl_consumer, token) - resp, content = client.request(WL_ACCESS_TOKEN_URL if not beta else BETA_ACCESS_TOKEN_URL, method="POST") + _resp, content = client.request(WL_ACCESS_TOKEN_URL if not beta else BETA_ACCESS_TOKEN_URL, method="POST") access_token = dict(cgi.parse_qsl(content)) conn.access = True diff --git a/src/catalogue/__init__.py b/src/catalogue/__init__.py index c53f0e73..e69de29b 100644 --- a/src/catalogue/__init__.py +++ b/src/catalogue/__init__.py @@ -1 +0,0 @@ - # pragma: no cover diff --git a/src/catalogue/admin.py b/src/catalogue/admin.py index 53e8a256..8daad6e0 100644 --- a/src/catalogue/admin.py +++ b/src/catalogue/admin.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.contrib import admin from catalogue import models diff --git a/src/catalogue/constants.py b/src/catalogue/constants.py index 0c842324..4775d187 100644 --- a/src/catalogue/constants.py +++ b/src/catalogue/constants.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/catalogue/ebook_utils.py b/src/catalogue/ebook_utils.py index c3e8b680..f9bd6d37 100644 --- a/src/catalogue/ebook_utils.py +++ b/src/catalogue/ebook_utils.py @@ -1,4 +1,6 @@ -# -*- coding: utf-8 -*- +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from io import BytesIO from catalogue.models import Book from librarian import DocProvider diff --git a/src/catalogue/feeds.py b/src/catalogue/feeds.py index 4884a4cd..99808bc6 100644 --- a/src/catalogue/feeds.py +++ b/src/catalogue/feeds.py @@ -1,8 +1,11 @@ -# -*- coding: utf-8 -*- +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.contrib.syndication.views import Feed from django.shortcuts import get_object_or_404 from catalogue.models import Book, Chunk + class PublishTrackFeed(Feed): title = u"Planowane publikacje" link = "/" diff --git a/src/catalogue/forms.py b/src/catalogue/forms.py index ea6a4aef..20709a52 100644 --- a/src/catalogue/forms.py +++ b/src/catalogue/forms.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/catalogue/helpers.py b/src/catalogue/helpers.py index 7c28188d..59545031 100644 --- a/src/catalogue/helpers.py +++ b/src/catalogue/helpers.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from datetime import date from functools import wraps from os.path import join diff --git a/src/catalogue/management/__init__.py b/src/catalogue/management/__init__.py index c629abfc..6f6f6b6e 100644 --- a/src/catalogue/management/__init__.py +++ b/src/catalogue/management/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/catalogue/management/commands/__init__.py b/src/catalogue/management/commands/__init__.py index bede0788..6e450663 100644 --- a/src/catalogue/management/commands/__init__.py +++ b/src/catalogue/management/commands/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/catalogue/management/commands/add_parent.py b/src/catalogue/management/commands/add_parent.py index 2ab0510c..49dff284 100644 --- a/src/catalogue/management/commands/add_parent.py +++ b/src/catalogue/management/commands/add_parent.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/catalogue/management/commands/fixdc.py b/src/catalogue/management/commands/fixdc.py index 0401e65e..cd691723 100644 --- a/src/catalogue/management/commands/fixdc.py +++ b/src/catalogue/management/commands/fixdc.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/catalogue/management/commands/import_wl.py b/src/catalogue/management/commands/import_wl.py index 754474be..bb891edd 100644 --- a/src/catalogue/management/commands/import_wl.py +++ b/src/catalogue/management/commands/import_wl.py @@ -1,5 +1,6 @@ -# -*- coding: utf-8 -*- - +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from collections import defaultdict import json from urllib.request import urlopen diff --git a/src/catalogue/management/commands/insert_isbn.py b/src/catalogue/management/commands/insert_isbn.py index e342c90d..5bacb4bd 100644 --- a/src/catalogue/management/commands/insert_isbn.py +++ b/src/catalogue/management/commands/insert_isbn.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/catalogue/management/commands/merge_books.py b/src/catalogue/management/commands/merge_books.py index f6b37bbb..cebf73bc 100644 --- a/src/catalogue/management/commands/merge_books.py +++ b/src/catalogue/management/commands/merge_books.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# import sys from django.contrib.auth.models import User diff --git a/src/catalogue/management/commands/prune_audience.py b/src/catalogue/management/commands/prune_audience.py index 2f661c2b..a271e329 100644 --- a/src/catalogue/management/commands/prune_audience.py +++ b/src/catalogue/management/commands/prune_audience.py @@ -1,9 +1,6 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # - import sys from django.contrib.auth.models import User from lxml import etree diff --git a/src/catalogue/managers.py b/src/catalogue/managers.py index a131ce94..137baaf5 100644 --- a/src/catalogue/managers.py +++ b/src/catalogue/managers.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.db import models class VisibleManager(models.Manager): diff --git a/src/catalogue/migrations/0001_initial.py b/src/catalogue/migrations/0001_initial.py index 794db482..8035a1ab 100644 --- a/src/catalogue/migrations/0001_initial.py +++ b/src/catalogue/migrations/0001_initial.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.db import models, migrations import datetime import django.db.models.deletion diff --git a/src/catalogue/migrations/0002_auto_20190307_1543.py b/src/catalogue/migrations/0002_auto_20190307_1543.py index a85062cb..a498a629 100644 --- a/src/catalogue/migrations/0002_auto_20190307_1543.py +++ b/src/catalogue/migrations/0002_auto_20190307_1543.py @@ -1,7 +1,6 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-03-07 15:43 -from __future__ import unicode_literals - +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.db import migrations diff --git a/src/catalogue/migrations/0003_chunk__new_publishable.py b/src/catalogue/migrations/0003_chunk__new_publishable.py index 237f3142..0d91052d 100644 --- a/src/catalogue/migrations/0003_chunk__new_publishable.py +++ b/src/catalogue/migrations/0003_chunk__new_publishable.py @@ -1,7 +1,6 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-03-07 15:48 -from __future__ import unicode_literals - +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.db import migrations, models diff --git a/src/catalogue/migrations/0004_auto_20191002_1224.py b/src/catalogue/migrations/0004_auto_20191002_1224.py index 443e7771..db6655f3 100644 --- a/src/catalogue/migrations/0004_auto_20191002_1224.py +++ b/src/catalogue/migrations/0004_auto_20191002_1224.py @@ -1,5 +1,6 @@ -# Generated by Django 2.0.13 on 2019-10-02 12:24 - +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.conf import settings from django.db import migrations, models import django.db.models.deletion diff --git a/src/catalogue/models/__init__.py b/src/catalogue/models/__init__.py index 0b9c4d17..86be6bc6 100755 --- a/src/catalogue/models/__init__.py +++ b/src/catalogue/models/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/catalogue/models/listeners.py b/src/catalogue/models/listeners.py index 2537a5bb..0c0663c9 100755 --- a/src/catalogue/models/listeners.py +++ b/src/catalogue/models/listeners.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/catalogue/models/project.py b/src/catalogue/models/project.py index d7cc0df9..caea8b80 100755 --- a/src/catalogue/models/project.py +++ b/src/catalogue/models/project.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/catalogue/signals.py b/src/catalogue/signals.py index 62ca5145..852dc964 100644 --- a/src/catalogue/signals.py +++ b/src/catalogue/signals.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.dispatch import Signal post_publish = Signal() diff --git a/src/catalogue/templatetags/book_list.py b/src/catalogue/templatetags/book_list.py index b4924335..db24c695 100755 --- a/src/catalogue/templatetags/book_list.py +++ b/src/catalogue/templatetags/book_list.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from re import split from django.db.models import Q, Count from django import template diff --git a/src/catalogue/templatetags/catalogue.py b/src/catalogue/templatetags/catalogue.py index 9c876ded..0bfd95ab 100644 --- a/src/catalogue/templatetags/catalogue.py +++ b/src/catalogue/templatetags/catalogue.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.urls import reverse from django import template from django.utils.translation import ugettext as _ diff --git a/src/catalogue/templatetags/common_tags.py b/src/catalogue/templatetags/common_tags.py index 7f5d0e9f..5544232e 100755 --- a/src/catalogue/templatetags/common_tags.py +++ b/src/catalogue/templatetags/common_tags.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django import template register = template.Library() diff --git a/src/catalogue/templatetags/set_get_parameter.py b/src/catalogue/templatetags/set_get_parameter.py index b3d44d73..36e22454 100755 --- a/src/catalogue/templatetags/set_get_parameter.py +++ b/src/catalogue/templatetags/set_get_parameter.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from re import split from django import template diff --git a/src/catalogue/templatetags/wall.py b/src/catalogue/templatetags/wall.py index 2dcf2ba5..7543616a 100755 --- a/src/catalogue/templatetags/wall.py +++ b/src/catalogue/templatetags/wall.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from datetime import timedelta from django.db.models import Q from django.urls import reverse diff --git a/src/catalogue/test_utils.py b/src/catalogue/test_utils.py index cacc9c8f..7343d5c1 100644 --- a/src/catalogue/test_utils.py +++ b/src/catalogue/test_utils.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/catalogue/tests/test_book.py b/src/catalogue/tests/test_book.py index df6f3b4f..1d26e4d3 100644 --- a/src/catalogue/tests/test_book.py +++ b/src/catalogue/tests/test_book.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/catalogue/tests/test_gallery.py b/src/catalogue/tests/test_gallery.py index 1452c1ad..32c0e0ac 100644 --- a/src/catalogue/tests/test_gallery.py +++ b/src/catalogue/tests/test_gallery.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/catalogue/tests/test_publish.py b/src/catalogue/tests/test_publish.py index 93e02daa..930d88a1 100644 --- a/src/catalogue/tests/test_publish.py +++ b/src/catalogue/tests/test_publish.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/catalogue/tests/test_xml_updater.py b/src/catalogue/tests/test_xml_updater.py index 9fb5a4a0..a5ce5671 100644 --- a/src/catalogue/tests/test_xml_updater.py +++ b/src/catalogue/tests/test_xml_updater.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/catalogue/urls.py b/src/catalogue/urls.py index 36930607..2cebacf0 100644 --- a/src/catalogue/urls.py +++ b/src/catalogue/urls.py @@ -1,4 +1,6 @@ -# -*- coding: utf-8 +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.conf.urls import url from django.contrib.auth.decorators import permission_required from django.views.generic import RedirectView diff --git a/src/catalogue/views.py b/src/catalogue/views.py index 377bdbbd..dcb68d8f 100644 --- a/src/catalogue/views.py +++ b/src/catalogue/views.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from collections import defaultdict from datetime import datetime, date, timedelta import logging diff --git a/src/catalogue/xml_tools.py b/src/catalogue/xml_tools.py index ff7b0310..917e62ac 100644 --- a/src/catalogue/xml_tools.py +++ b/src/catalogue/xml_tools.py @@ -1,4 +1,6 @@ -# -*- coding: utf-8 -*- +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from copy import deepcopy import re diff --git a/src/cover/management/__init__.py b/src/cover/management/__init__.py index d3841244..e69de29b 100644 --- a/src/cover/management/__init__.py +++ b/src/cover/management/__init__.py @@ -1,4 +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. -# diff --git a/src/cover/management/commands/__init__.py b/src/cover/management/commands/__init__.py index d3841244..e69de29b 100644 --- a/src/cover/management/commands/__init__.py +++ b/src/cover/management/commands/__init__.py @@ -1,4 +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. -# diff --git a/src/cover/management/commands/refresh_covers.py b/src/cover/management/commands/refresh_covers.py index 0e998c99..57325633 100644 --- a/src/cover/management/commands/refresh_covers.py +++ b/src/cover/management/commands/refresh_covers.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/cover/migrations/0001_initial.py b/src/cover/migrations/0001_initial.py index 648d53ce..562cdff2 100644 --- a/src/cover/migrations/0001_initial.py +++ b/src/cover/migrations/0001_initial.py @@ -1,6 +1,6 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.db import models, migrations import cover.models diff --git a/src/cover/migrations/0002_auto_20191002_1224.py b/src/cover/migrations/0002_auto_20191002_1224.py index 3f5864e6..b2f97e13 100644 --- a/src/cover/migrations/0002_auto_20191002_1224.py +++ b/src/cover/migrations/0002_auto_20191002_1224.py @@ -1,5 +1,6 @@ -# Generated by Django 2.0.13 on 2019-10-02 12:24 - +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# import cover.models from django.db import migrations, models diff --git a/src/cover/tests.py b/src/cover/tests.py index a4f5a5e3..838b9bfe 100644 --- a/src/cover/tests.py +++ b/src/cover/tests.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/cover/urls.py b/src/cover/urls.py index febe3f0f..cff09a68 100644 --- a/src/cover/urls.py +++ b/src/cover/urls.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/cover/utils.py b/src/cover/utils.py index 75bf96d2..d13554fa 100755 --- a/src/cover/utils.py +++ b/src/cover/utils.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/cover/views.py b/src/cover/views.py index 3f2c46fa..a99c8d5e 100644 --- a/src/cover/views.py +++ b/src/cover/views.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/dvcs/signals.py b/src/dvcs/signals.py index 5da075be..14f37f40 100755 --- a/src/dvcs/signals.py +++ b/src/dvcs/signals.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.dispatch import Signal post_commit = Signal() diff --git a/src/dvcs/storage.py b/src/dvcs/storage.py index a57d759f..76051aba 100755 --- a/src/dvcs/storage.py +++ b/src/dvcs/storage.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from zlib import compress, decompress from django.core.files.base import ContentFile, File diff --git a/src/dvcs/tests/migrations/0001_initial.py b/src/dvcs/tests/migrations/0001_initial.py index 39176de8..e6e2b513 100644 --- a/src/dvcs/tests/migrations/0001_initial.py +++ b/src/dvcs/tests/migrations/0001_initial.py @@ -1,7 +1,6 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9.13 on 2019-02-28 00:55 -from __future__ import unicode_literals - +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# import datetime import os.path from django.conf import settings diff --git a/src/dvcs/tests/models.py b/src/dvcs/tests/models.py index b2dc93e5..dd57b055 100644 --- a/src/dvcs/tests/models.py +++ b/src/dvcs/tests/models.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from dvcs.models import Document class ADocument(Document): diff --git a/src/dvcs/tests/tests.py b/src/dvcs/tests/tests.py index d4e9b0b1..084e528b 100644 --- a/src/dvcs/tests/tests.py +++ b/src/dvcs/tests/tests.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.test import TestCase from .models import ADocument diff --git a/src/email_mangler/models.py b/src/email_mangler/models.py deleted file mode 100644 index e69de29b..00000000 diff --git a/src/email_mangler/templatetags/__init__.py b/src/email_mangler/templatetags/__init__.py old mode 100755 new mode 100644 diff --git a/src/email_mangler/templatetags/email.py b/src/email_mangler/templatetags/email.py index 40ad72f5..dbf29396 100755 --- a/src/email_mangler/templatetags/email.py +++ b/src/email_mangler/templatetags/email.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# import codecs from django.utils.html import escape from django.utils.safestring import mark_safe diff --git a/src/fileupload/forms.py b/src/fileupload/forms.py index f5e10699..9f235aa5 100644 --- a/src/fileupload/forms.py +++ b/src/fileupload/forms.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django import forms class UploadForm(forms.Form): diff --git a/src/fileupload/models.py b/src/fileupload/models.py deleted file mode 100644 index 8b137891..00000000 --- a/src/fileupload/models.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/fileupload/templatetags/upload_tags.py b/src/fileupload/templatetags/upload_tags.py index 4eb4251d..31cd5bb5 100644 --- a/src/fileupload/templatetags/upload_tags.py +++ b/src/fileupload/templatetags/upload_tags.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django import template from django.utils.safestring import mark_safe diff --git a/src/fileupload/urls.py b/src/fileupload/urls.py index cd4f46c3..a197e985 100644 --- a/src/fileupload/urls.py +++ b/src/fileupload/urls.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.conf.urls import patterns, url from fileupload.views import UploadView diff --git a/src/fileupload/views.py b/src/fileupload/views.py index eb7959c3..56a198ed 100644 --- a/src/fileupload/views.py +++ b/src/fileupload/views.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# import json import os from urllib.parse import quote diff --git a/src/manage.py b/src/manage.py index 7e839324..417a05c7 100755 --- a/src/manage.py +++ b/src/manage.py @@ -1,4 +1,7 @@ #!/usr/bin/env python +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# import os import sys diff --git a/src/redakcja/context_processors.py b/src/redakcja/context_processors.py index 5e3372ea..e750fd2a 100644 --- a/src/redakcja/context_processors.py +++ b/src/redakcja/context_processors.py @@ -1,5 +1,6 @@ -# -*- coding: utf-8 - +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# def settings(request): from django.conf import settings @@ -7,7 +8,7 @@ def settings(request): import subprocess process = subprocess.Popen(["git", "show", "--oneline"], stdout=subprocess.PIPE) data, _err = process.communicate() - # get app version + # get app version VERSION = data.splitlines()[0].split()[0] else: VERSION = '' diff --git a/src/redakcja/settings/__init__.py b/src/redakcja/settings/__init__.py index 67be05b5..c8a4a828 100644 --- a/src/redakcja/settings/__init__.py +++ b/src/redakcja/settings/__init__.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# import os.path import sentry_sdk from sentry_sdk.integrations.django import DjangoIntegration @@ -125,8 +128,8 @@ PIPELINE = { 'css/filelist.css', ), 'output_filename': 'compressed/catalogue_styles.css', - }, - 'book': { + }, + 'book': { 'source_filenames': ( 'css/book.css', ), @@ -176,7 +179,7 @@ PIPELINE = { 'js/wiki/view_column_diff.js', ), 'output_filename': 'compressed/detail_scripts.js', - }, + }, 'wiki_img': { 'source_filenames': ( # libraries @@ -208,7 +211,7 @@ PIPELINE = { 'js/wiki/view_column_diff.js', ), 'output_filename': 'compressed/detail_img_scripts.js', - }, + }, 'catalogue': { 'source_filenames': ( 'js/catalogue/catalogue.js', @@ -216,8 +219,8 @@ PIPELINE = { 'email_mangler/email_mangler.js', ), 'output_filename': 'compressed/catalogue_scripts.js', - }, - 'book': { + }, + 'book': { 'source_filenames': ( 'js/book_text/jquery.eventdelegation.js', 'js/book_text/jquery.scrollto.js', @@ -247,4 +250,3 @@ else: dsn=SENTRY_DSN, integrations=[DjangoIntegration()] ) - diff --git a/src/redakcja/settings/defaults.py b/src/redakcja/settings/defaults.py index c3dc9819..547269b1 100644 --- a/src/redakcja/settings/defaults.py +++ b/src/redakcja/settings/defaults.py @@ -1,5 +1,6 @@ -# -*- coding: utf-8 -*- -from __future__ import absolute_import +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# import os.path PROJECT_ROOT = os.path.realpath(os.path.dirname(os.path.dirname(__file__))) diff --git a/src/redakcja/settings/integration_test.py b/src/redakcja/settings/integration_test.py index ba477bb0..0df6eb47 100644 --- a/src/redakcja/settings/integration_test.py +++ b/src/redakcja/settings/integration_test.py @@ -1,7 +1,9 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from redakcja.settings.test import * NOSE_ARGS = () STATIC_ROOT_SYMLINK = os.path.dirname(STATIC_ROOT) + '_test' STATICFILES_DIRS.append(STATIC_ROOT_SYMLINK) - diff --git a/src/redakcja/settings/test.py b/src/redakcja/settings/test.py index fb27d3c5..4a80142f 100644 --- a/src/redakcja/settings/test.py +++ b/src/redakcja/settings/test.py @@ -1,5 +1,10 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +import tempfile from redakcja.settings import * + DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. @@ -10,7 +15,6 @@ DATABASES = { 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } -import tempfile CATALOGUE_REPO_PATH = tempfile.mkdtemp(prefix='redakcja-repo') CATALOGUE_IMAGE_REPO_PATH = tempfile.mkdtemp(prefix='redakcja-repo-img') diff --git a/src/redakcja/urls.py b/src/redakcja/urls.py index 2ecb7ed4..0e4dceab 100644 --- a/src/redakcja/urls.py +++ b/src/redakcja/urls.py @@ -1,5 +1,6 @@ -# -*- coding: utf-8 -*- - +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.conf.urls import include, url from django.contrib import admin from django.conf import settings @@ -20,7 +21,7 @@ urlpatterns = [ url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', admin.site.urls), - url(r'^$', RedirectView.as_view(url= '/documents/', permanent=False)), + url(r'^$', RedirectView.as_view(url='/documents/', permanent=False)), url(r'^documents/', include('catalogue.urls')), url(r'^apiclient/', include('apiclient.urls')), url(r'^editor/', include('wiki.urls')), @@ -33,4 +34,4 @@ if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) import debug_toolbar - urlpatterns += (url(r'^__debug__/', include(debug_toolbar.urls))), + urlpatterns += [url(r'^__debug__/', include(debug_toolbar.urls))] diff --git a/src/redakcja/wsgi.py b/src/redakcja/wsgi.py index b0097e65..fa6def7f 100755 --- a/src/redakcja/wsgi.py +++ b/src/redakcja/wsgi.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# import os diff --git a/src/toolbar/__init__.py b/src/toolbar/__init__.py index c53f0e73..e69de29b 100644 --- a/src/toolbar/__init__.py +++ b/src/toolbar/__init__.py @@ -1 +0,0 @@ - # pragma: no cover diff --git a/src/toolbar/admin.py b/src/toolbar/admin.py index 9d3c68d9..0cfc1886 100644 --- a/src/toolbar/admin.py +++ b/src/toolbar/admin.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from django import forms diff --git a/src/toolbar/management/__init__.py b/src/toolbar/management/__init__.py index 792d6005..e69de29b 100644 --- a/src/toolbar/management/__init__.py +++ b/src/toolbar/management/__init__.py @@ -1 +0,0 @@ -# diff --git a/src/toolbar/management/commands/fixbuttons.py b/src/toolbar/management/commands/fixbuttons.py index 7fed15a7..0eb8323a 100644 --- a/src/toolbar/management/commands/fixbuttons.py +++ b/src/toolbar/management/commands/fixbuttons.py @@ -1,6 +1,3 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/toolbar/migrations/0001_initial.py b/src/toolbar/migrations/0001_initial.py index e396fac1..184436d0 100644 --- a/src/toolbar/migrations/0001_initial.py +++ b/src/toolbar/migrations/0001_initial.py @@ -1,6 +1,6 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.db import models, migrations diff --git a/src/toolbar/migrations/0002_auto_20191002_1224.py b/src/toolbar/migrations/0002_auto_20191002_1224.py index b2f134b6..64a023d6 100644 --- a/src/toolbar/migrations/0002_auto_20191002_1224.py +++ b/src/toolbar/migrations/0002_auto_20191002_1224.py @@ -1,5 +1,6 @@ -# Generated by Django 2.0.13 on 2019-10-02 12:24 - +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.db import migrations, models import django.db.models.deletion diff --git a/src/toolbar/migrations/__init__.py b/src/toolbar/migrations/__init__.py index 9012566c..e69de29b 100644 --- a/src/toolbar/migrations/__init__.py +++ b/src/toolbar/migrations/__init__.py @@ -1 +0,0 @@ -# pragma: no cover diff --git a/src/toolbar/templatetags/toolbar_tags.py b/src/toolbar/templatetags/toolbar_tags.py index 0766677e..3fa5e1b0 100644 --- a/src/toolbar/templatetags/toolbar_tags.py +++ b/src/toolbar/templatetags/toolbar_tags.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/wiki/__init__.py b/src/wiki/__init__.py index c53f0e73..e69de29b 100644 --- a/src/wiki/__init__.py +++ b/src/wiki/__init__.py @@ -1 +0,0 @@ - # pragma: no cover diff --git a/src/wiki/admin.py b/src/wiki/admin.py index ae309a9d..eb892505 100644 --- a/src/wiki/admin.py +++ b/src/wiki/admin.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.contrib import admin from wiki import models diff --git a/src/wiki/helpers.py b/src/wiki/helpers.py index 6ad6bb63..9b1b3273 100644 --- a/src/wiki/helpers.py +++ b/src/wiki/helpers.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from datetime import datetime from functools import wraps diff --git a/src/wiki/migrations/0001_initial.py b/src/wiki/migrations/0001_initial.py index 79c8e993..5d7de925 100644 --- a/src/wiki/migrations/0001_initial.py +++ b/src/wiki/migrations/0001_initial.py @@ -1,6 +1,6 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.db import models, migrations diff --git a/src/wiki/models.py b/src/wiki/models.py index fb203924..456e2195 100644 --- a/src/wiki/models.py +++ b/src/wiki/models.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/wiki/nice_diff.py b/src/wiki/nice_diff.py index b228fad9..99f6bae6 100644 --- a/src/wiki/nice_diff.py +++ b/src/wiki/nice_diff.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/wiki/settings.py b/src/wiki/settings.py index 50f49d8b..ea9e3021 100644 --- a/src/wiki/settings.py +++ b/src/wiki/settings.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.conf import settings GALLERY_URL = settings.MEDIA_URL + 'images/' diff --git a/src/wiki/urls.py b/src/wiki/urls.py index eb70ffe6..ddc0dfcb 100644 --- a/src/wiki/urls.py +++ b/src/wiki/urls.py @@ -1,4 +1,6 @@ -# -*- coding: utf-8 +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.conf.urls import url from . import views diff --git a/src/wiki/views.py b/src/wiki/views.py index 6b3586c1..17f7b73c 100644 --- a/src/wiki/views.py +++ b/src/wiki/views.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from datetime import datetime import os import logging diff --git a/src/wiki_img/__init__.py b/src/wiki_img/__init__.py index c53f0e73..e69de29b 100644 --- a/src/wiki_img/__init__.py +++ b/src/wiki_img/__init__.py @@ -1 +0,0 @@ - # pragma: no cover diff --git a/src/wiki_img/forms.py b/src/wiki_img/forms.py index 555f2647..ae68439e 100644 --- a/src/wiki_img/forms.py +++ b/src/wiki_img/forms.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # diff --git a/src/wiki_img/models.py b/src/wiki_img/models.py deleted file mode 100644 index b685324b..00000000 --- a/src/wiki_img/models.py +++ /dev/null @@ -1,5 +0,0 @@ -# -*- coding: utf-8 -*- -# -# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. -# diff --git a/src/wiki_img/tests.py b/src/wiki_img/tests.py index 2b342da6..cf3d72ba 100644 --- a/src/wiki_img/tests.py +++ b/src/wiki_img/tests.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# import wiki.models as models import shutil import tempfile diff --git a/src/wiki_img/urls.py b/src/wiki_img/urls.py index 1bf14b8e..82244841 100644 --- a/src/wiki_img/urls.py +++ b/src/wiki_img/urls.py @@ -1,4 +1,6 @@ -# -*- coding: utf-8 +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.conf.urls import url from . import views diff --git a/src/wiki_img/views.py b/src/wiki_img/views.py index adbad5ca..280848a8 100644 --- a/src/wiki_img/views.py +++ b/src/wiki_img/views.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# import os import functools import logging