From: Radek Czajka Date: Tue, 1 Oct 2019 08:56:32 +0000 (+0200) Subject: Fixes X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/f16104e5ce08700745c66caf77c2e6403243059c Fixes --- diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 6bbdf22b..09a9877a 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -8,7 +8,7 @@ oauth2 httplib2 # oauth2 dependency python-slugify -librarian==1.7.1 +librarian==1.7.6 ## Django Django==1.11.20 diff --git a/src/apiclient/__init__.py b/src/apiclient/__init__.py index 56ecb96d..5eee2fdc 100644 --- a/src/apiclient/__init__.py +++ b/src/apiclient/__init__.py @@ -1,7 +1,6 @@ -import urllib - import json import oauth2 +from urllib.parse import urlencode from apiclient.settings import WL_CONSUMER_KEY, WL_CONSUMER_SECRET, WL_API_URL, BETA_API_URL @@ -30,7 +29,7 @@ def api_call(user, path, data=None, beta=False): client = oauth2.Client(wl_consumer, token) if data is not None: data = json.dumps(data) - data = urllib.urlencode({"data": data}) + data = urlencode({"data": data}) resp, content = client.request( "%s%s" % (api_url, path), method="POST", diff --git a/src/catalogue/models/book.py b/src/catalogue/models/book.py index 229b3d0b..a846f6e9 100755 --- a/src/catalogue/models/book.py +++ b/src/catalogue/models/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. # @@ -95,7 +93,7 @@ class Book(models.Model): # ======================= def accessible(self, request): - return self.public or request.user.is_authenticated() + return self.public or request.user.is_authenticated @classmethod @transaction.atomic diff --git a/src/catalogue/models/image.py b/src/catalogue/models/image.py index 8cadcec2..dbe1c047 100755 --- a/src/catalogue/models/image.py +++ b/src/catalogue/models/image.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. # @@ -101,7 +99,7 @@ class Image(dvcs_models.Document): return None def accessible(self, request): - return self.public or request.user.is_authenticated() + return self.public or request.user.is_authenticated def is_new_publishable(self): change = self.publishable() diff --git a/src/catalogue/templates/catalogue/active_users_list.html b/src/catalogue/templates/catalogue/active_users_list.html index f711b605..3741b412 100755 --- a/src/catalogue/templates/catalogue/active_users_list.html +++ b/src/catalogue/templates/catalogue/active_users_list.html @@ -8,7 +8,7 @@ {% block content %}

- {% trans "Active users since" %} {{ since }} + {% trans "Users active in the year" %} {{ year }}