From d6476aea9a0de083f19c70e464b9a75d31663c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tayyip=20G=C3=B6ren?= Date: Sat, 24 Jul 2021 11:41:04 +0300 Subject: [PATCH 1/2] Add six for Django 3 comp --- jet/models.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jet/models.py b/jet/models.py index 8fe97564..254e892e 100644 --- a/jet/models.py +++ b/jet/models.py @@ -1,6 +1,6 @@ from django.db import models from django.utils import timezone -from django.utils.encoding import python_2_unicode_compatible +from six import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ diff --git a/setup.py b/setup.py index 1cf51df6..f53c1e20 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ def read(fname): def get_install_requires(): - install_requires = ['Django'] + install_requires = ['Django', 'six'] try: import importlib From 9c3a0d5e449a4e24022a28dde90df236565d3b35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tayyip=20G=C3=B6ren?= Date: Wed, 29 Sep 2021 11:57:42 +0300 Subject: [PATCH 2/2] Fix issues --- jet/dashboard/models.py | 2 +- jet/dashboard/templates/admin/index.html | 2 +- jet/templates/admin/edit_inline/compact.html | 2 +- jet/templates/rangefilter/date_filter.html | 2 +- jet/tests/models.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/jet/dashboard/models.py b/jet/dashboard/models.py index cf43c30c..d6a6c435 100644 --- a/jet/dashboard/models.py +++ b/jet/dashboard/models.py @@ -1,7 +1,7 @@ from importlib import import_module import json from django.db import models -from django.utils.encoding import python_2_unicode_compatible +from six import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from jet.utils import LazyDateTimeEncoder diff --git a/jet/dashboard/templates/admin/index.html b/jet/dashboard/templates/admin/index.html index 228ece54..e4fa151a 100644 --- a/jet/dashboard/templates/admin/index.html +++ b/jet/dashboard/templates/admin/index.html @@ -1,5 +1,5 @@ {% extends "admin/base_site.html" %} -{% load i18n admin_static jet_dashboard_tags static %} +{% load i18n jet_dashboard_tags static %} {% block html %}{% get_dashboard 'index' as dashboard %}{{ block.super }}{% endblock %} diff --git a/jet/templates/admin/edit_inline/compact.html b/jet/templates/admin/edit_inline/compact.html index dd4232ee..52d5a5ac 100644 --- a/jet/templates/admin/edit_inline/compact.html +++ b/jet/templates/admin/edit_inline/compact.html @@ -1,4 +1,4 @@ -{% load i18n admin_urls admin_static %} +{% load i18n admin_urls static %}

{{ inline_admin_formset.opts.verbose_name_plural|capfirst }}

diff --git a/jet/templates/rangefilter/date_filter.html b/jet/templates/rangefilter/date_filter.html index f0e47656..47327ec0 100644 --- a/jet/templates/rangefilter/date_filter.html +++ b/jet/templates/rangefilter/date_filter.html @@ -1,4 +1,4 @@ -{% load i18n admin_static %} +{% load i18n static %}

{% blocktrans with filter_title=title %} By {{ filter_title }} {% endblocktrans %}