diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index bbf59cb..996a5ce 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -2,27 +2,27 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/asottile/pyupgrade
- rev: v3.1.0
+ rev: v3.3.1
hooks:
- id: pyupgrade
- args: ['--keep-percent-format', '--py37-plus']
+ args: ['--keep-percent-format', '--py39-plus']
- repo: https://github.com/adamchainz/django-upgrade
- rev: 1.10.0
+ rev: 1.13.0
hooks:
- id: django-upgrade
- args: ['--target-version', '2.2']
+ args: ['--target-version', '3.2']
- repo: https://github.com/psf/black
- rev: 22.3.0
+ rev: 23.3.0
hooks:
- id: black
- args: ['--target-version', 'py37', '--skip-string-normalization', '--line-length', '110']
+ args: ['--target-version', 'py39', '--skip-string-normalization', '--line-length', '110']
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args: ['--profile', 'black', '--line-length', '110']
- repo: https://github.com/rtts/djhtml
- rev: 'v1.5.2'
+ rev: '3.0.6'
hooks:
- id: djhtml
args: ['--tabwidth', '2']
diff --git a/README b/README
index 698ed46..9b9db3f 100644
--- a/README
+++ b/README
@@ -194,7 +194,7 @@ djhtml is used to automatically indent html files, using those parameters:
django-upgrade is used to automatically upgrade Django syntax, using those parameters:
- django-upgrade --target-version 2.2
+ django-upgrade --target-version 3.2
There is .pre-commit-config.yaml to use pre-commit to automatically run these tools
before commits. (execute `pre-commit install` to install the git hook.)
diff --git a/debian/control b/debian/control
index 8b2b24a..1ca9f1e 100644
--- a/debian/control
+++ b/debian/control
@@ -14,7 +14,7 @@ Package: python3-hobo
Architecture: all
Depends: python3-apt,
python3-celery (>= 3.1.13),
- python3-django (>= 2:2.2),
+ python3-django (>= 2:3.2),
python3-djangorestframework,
python3-dnspython,
python3-memcache,
diff --git a/hobo/agent/authentic2/__init__.py b/hobo/agent/authentic2/__init__.py
index a524709..e69de29 100644
--- a/hobo/agent/authentic2/__init__.py
+++ b/hobo/agent/authentic2/__init__.py
@@ -1 +0,0 @@
-default_app_config = 'hobo.agent.authentic2.apps.Authentic2AgentConfig'
diff --git a/hobo/agent/authentic2/management/commands/hobo_deploy.py b/hobo/agent/authentic2/management/commands/hobo_deploy.py
index 2dc4286..2f7bd47 100644
--- a/hobo/agent/authentic2/management/commands/hobo_deploy.py
+++ b/hobo/agent/authentic2/management/commands/hobo_deploy.py
@@ -15,7 +15,7 @@ from django.contrib.auth import get_user_model
from django.contrib.contenttypes.models import ContentType
from django.core import serializers
from django.utils.translation import activate
-from django.utils.translation import ugettext as _
+from django.utils.translation import gettext as _
from tenant_schemas.utils import tenant_context
from hobo.agent.authentic2.provisionning import Provisionning
diff --git a/hobo/agent/authentic2/provisionning.py b/hobo/agent/authentic2/provisionning.py
index 231ddca..3e9bbb0 100644
--- a/hobo/agent/authentic2/provisionning.py
+++ b/hobo/agent/authentic2/provisionning.py
@@ -15,7 +15,7 @@ from django.conf import settings
from django.contrib.auth import get_user_model
from django.db import connection, transaction
from django.urls import reverse
-from django.utils.encoding import force_text
+from django.utils.encoding import force_str
from hobo.agent.common import notify_agents
from hobo.signature import sign_url
@@ -141,7 +141,7 @@ class Provisionning(threading.local):
tuple(allowed_technical_roles_prefixes)
)
- issuer = force_text(self.get_entity_id())
+ issuer = force_str(self.get_entity_id())
if mode == 'provision':
def user_to_json(ou, service, user, user_roles):
@@ -245,7 +245,7 @@ class Provisionning(threading.local):
continue
logger.info(
'provisionning users %s to %s',
- ', '.join(map(force_text, users)),
+ ', '.join(map(force_str, users)),
', '.join(audience),
)
self.notify_agents(
@@ -264,7 +264,7 @@ class Provisionning(threading.local):
elif users:
audience = [audience for ou in ous.keys() for s, audience in self.get_audience(ou)]
logger.info(
- 'deprovisionning users %s from %s', ', '.join(map(force_text, users)), ', '.join(audience)
+ 'deprovisionning users %s from %s', ', '.join(map(force_str, users)), ', '.join(audience)
)
self.notify_agents(
{
diff --git a/hobo/agent/common/management/commands/hobo_deploy.py b/hobo/agent/common/management/commands/hobo_deploy.py
index 8ff04fd..940d2e2 100644
--- a/hobo/agent/common/management/commands/hobo_deploy.py
+++ b/hobo/agent/common/management/commands/hobo_deploy.py
@@ -9,7 +9,7 @@ import requests
from django.conf import settings
from django.core.management import call_command, get_commands
from django.core.management.base import BaseCommand, CommandError
-from django.utils.encoding import force_text
+from django.utils.encoding import force_str
from tenant_schemas.utils import tenant_context
from hobo.multitenant.middleware import TenantMiddleware, TenantNotFound
@@ -23,7 +23,7 @@ def replace_file(path, content):
dirname = os.path.dirname(path)
fd, temp = tempfile.mkstemp(dir=dirname, prefix='.tmp-' + os.path.basename(path) + '-')
f = os.fdopen(fd, 'w')
- f.write(force_text(content))
+ f.write(force_str(content))
f.flush()
os.fsync(f.fileno())
f.close()
@@ -32,7 +32,7 @@ def replace_file(path, content):
class Command(BaseCommand):
early_secondary_exit = True
- requires_system_checks = False
+ requires_system_checks = []
me = None
def add_arguments(self, parser):
diff --git a/hobo/agent/common/management/commands/hobo_notify.py b/hobo/agent/common/management/commands/hobo_notify.py
index ea62d29..409d9b5 100644
--- a/hobo/agent/common/management/commands/hobo_notify.py
+++ b/hobo/agent/common/management/commands/hobo_notify.py
@@ -29,7 +29,7 @@ logger = logging.getLogger(__name__)
class Command(BaseCommand, NotificationProcessing):
- requires_system_checks = False
+ requires_system_checks = []
def add_arguments(self, parser):
parser.add_argument('notification', metavar='NOTIFICATION', type=str)
diff --git a/hobo/agent/common/migrations/0001_initial.py b/hobo/agent/common/migrations/0001_initial.py
index a10a8dd..dc8cc1b 100644
--- a/hobo/agent/common/migrations/0001_initial.py
+++ b/hobo/agent/common/migrations/0001_initial.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('auth', '0001_initial'),
]
diff --git a/hobo/agent/common/migrations/0002_auto_20160105_1702.py b/hobo/agent/common/migrations/0002_auto_20160105_1702.py
index 11b293d..4394085 100644
--- a/hobo/agent/common/migrations/0002_auto_20160105_1702.py
+++ b/hobo/agent/common/migrations/0002_auto_20160105_1702.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('common', '0001_initial'),
]
diff --git a/hobo/agent/common/migrations/0003_auto_20200707_1656.py b/hobo/agent/common/migrations/0003_auto_20200707_1656.py
index 5911dcd..391a366 100644
--- a/hobo/agent/common/migrations/0003_auto_20200707_1656.py
+++ b/hobo/agent/common/migrations/0003_auto_20200707_1656.py
@@ -5,7 +5,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('common', '0002_auto_20160105_1702'),
]
diff --git a/hobo/agent/common/migrations/0004_alter_role_uuid.py b/hobo/agent/common/migrations/0004_alter_role_uuid.py
index 8e82d48..2082187 100644
--- a/hobo/agent/common/migrations/0004_alter_role_uuid.py
+++ b/hobo/agent/common/migrations/0004_alter_role_uuid.py
@@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('common', '0003_auto_20200707_1656'),
]
diff --git a/hobo/agent/common/migrations/0005_userextraattributes.py b/hobo/agent/common/migrations/0005_userextraattributes.py
index 5df2128..b672e84 100644
--- a/hobo/agent/common/migrations/0005_userextraattributes.py
+++ b/hobo/agent/common/migrations/0005_userextraattributes.py
@@ -7,7 +7,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('common', '0004_alter_role_uuid'),
diff --git a/hobo/agent/common/models.py b/hobo/agent/common/models.py
index de69f7d..5cc80c2 100644
--- a/hobo/agent/common/models.py
+++ b/hobo/agent/common/models.py
@@ -1,7 +1,8 @@
from django.conf import settings
from django.contrib.auth.models import Group
-from django.contrib.postgres.fields import ArrayField, JSONField
+from django.contrib.postgres.fields import ArrayField
from django.db import models
+from django.db.models import JSONField
class Role(Group):
diff --git a/hobo/agent/hobo/__init__.py b/hobo/agent/hobo/__init__.py
index e61b19d..e69de29 100644
--- a/hobo/agent/hobo/__init__.py
+++ b/hobo/agent/hobo/__init__.py
@@ -1 +0,0 @@
-default_app_config = 'hobo.agent.hobo.apps.HoboAgentConfig'
diff --git a/hobo/applications/forms.py b/hobo/applications/forms.py
index 4796cf1..3bb0588 100644
--- a/hobo/applications/forms.py
+++ b/hobo/applications/forms.py
@@ -15,7 +15,7 @@
# along with this program. If not, see .
from django import forms
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
from hobo.applications.models import Application
diff --git a/hobo/applications/migrations/0001_initial.py b/hobo/applications/migrations/0001_initial.py
index fb24181..413621c 100644
--- a/hobo/applications/migrations/0001_initial.py
+++ b/hobo/applications/migrations/0001_initial.py
@@ -7,7 +7,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
initial = True
dependencies = []
diff --git a/hobo/applications/migrations/0002_icon.py b/hobo/applications/migrations/0002_icon.py
index ffb329b..8508b70 100644
--- a/hobo/applications/migrations/0002_icon.py
+++ b/hobo/applications/migrations/0002_icon.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('applications', '0001_initial'),
]
diff --git a/hobo/applications/migrations/0003_version_num_notes.py b/hobo/applications/migrations/0003_version_num_notes.py
index 53ac41e..3f3385a 100644
--- a/hobo/applications/migrations/0003_version_num_notes.py
+++ b/hobo/applications/migrations/0003_version_num_notes.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('applications', '0002_icon'),
]
diff --git a/hobo/applications/migrations/0004_version_num_notes.py b/hobo/applications/migrations/0004_version_num_notes.py
index b0013c8..8540c32 100644
--- a/hobo/applications/migrations/0004_version_num_notes.py
+++ b/hobo/applications/migrations/0004_version_num_notes.py
@@ -13,7 +13,6 @@ def forwards(apps, schema_editor):
class Migration(migrations.Migration):
-
dependencies = [
('applications', '0003_version_num_notes'),
]
diff --git a/hobo/applications/migrations/0005_version_num_notes.py b/hobo/applications/migrations/0005_version_num_notes.py
index 4e2df9c..70f0feb 100644
--- a/hobo/applications/migrations/0005_version_num_notes.py
+++ b/hobo/applications/migrations/0005_version_num_notes.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('applications', '0004_version_num_notes'),
]
diff --git a/hobo/applications/migrations/0006_documentation_url.py b/hobo/applications/migrations/0006_documentation_url.py
index 7d93dfe..7653e62 100644
--- a/hobo/applications/migrations/0006_documentation_url.py
+++ b/hobo/applications/migrations/0006_documentation_url.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('applications', '0005_version_num_notes'),
]
diff --git a/hobo/applications/migrations/0007_asyncjob.py b/hobo/applications/migrations/0007_asyncjob.py
index 3474155..670d601 100644
--- a/hobo/applications/migrations/0007_asyncjob.py
+++ b/hobo/applications/migrations/0007_asyncjob.py
@@ -6,7 +6,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('applications', '0006_documentation_url'),
]
diff --git a/hobo/applications/migrations/0008_element_error.py b/hobo/applications/migrations/0008_element_error.py
index f42303f..80c278d 100644
--- a/hobo/applications/migrations/0008_element_error.py
+++ b/hobo/applications/migrations/0008_element_error.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('applications', '0007_asyncjob'),
]
diff --git a/hobo/applications/migrations/0009_job_progression.py b/hobo/applications/migrations/0009_job_progression.py
index 4770f99..1343a43 100644
--- a/hobo/applications/migrations/0009_job_progression.py
+++ b/hobo/applications/migrations/0009_job_progression.py
@@ -3,7 +3,6 @@ from django.db import migrations
class Migration(migrations.Migration):
-
dependencies = [
('applications', '0008_element_error'),
]
diff --git a/hobo/applications/migrations/0010_relation_error.py b/hobo/applications/migrations/0010_relation_error.py
index 13263ad..0435137 100644
--- a/hobo/applications/migrations/0010_relation_error.py
+++ b/hobo/applications/migrations/0010_relation_error.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('applications', '0009_job_progression'),
]
diff --git a/hobo/applications/migrations/0011_element_type.py b/hobo/applications/migrations/0011_element_type.py
index 6e8afdb..a8c99e0 100644
--- a/hobo/applications/migrations/0011_element_type.py
+++ b/hobo/applications/migrations/0011_element_type.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('applications', '0010_relation_error'),
]
diff --git a/hobo/applications/models.py b/hobo/applications/models.py
index 8005c1b..53b4895 100644
--- a/hobo/applications/models.py
+++ b/hobo/applications/models.py
@@ -23,12 +23,12 @@ import traceback
import urllib.parse
from django.conf import settings
-from django.contrib.postgres.fields import JSONField
from django.core.files.base import ContentFile
from django.db import connection, models
+from django.db.models import JSONField
from django.utils.text import slugify
from django.utils.timezone import now
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
from hobo.environment.utils import get_installed_services
diff --git a/hobo/applications/views.py b/hobo/applications/views.py
index 8fe42f2..0bcd6b1 100644
--- a/hobo/applications/views.py
+++ b/hobo/applications/views.py
@@ -26,7 +26,7 @@ from django.shortcuts import get_object_or_404
from django.urls import reverse, reverse_lazy
from django.utils.text import slugify
from django.utils.timezone import now
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
from django.views.generic import DetailView, FormView, ListView, TemplateView
from django.views.generic.edit import CreateView, DeleteView, UpdateView
diff --git a/hobo/debug/forms.py b/hobo/debug/forms.py
index 16577ee..a8ba01d 100644
--- a/hobo/debug/forms.py
+++ b/hobo/debug/forms.py
@@ -17,7 +17,7 @@
from django import forms
from django.core.exceptions import ValidationError
from django.core.validators import validate_ipv46_address
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
def validate_space_separated_ips(value):
diff --git a/hobo/debug/templates/hobo/debug_home.html b/hobo/debug/templates/hobo/debug_home.html
index 0bff523..519837a 100644
--- a/hobo/debug/templates/hobo/debug_home.html
+++ b/hobo/debug/templates/hobo/debug_home.html
@@ -19,7 +19,7 @@
+ name="toggle-current-ip">{% if current_ip_debug %}{% trans "Remove current IP" %}{% else %}{% trans "Add current IP" %}{% endif %} - {{ view.current_ip }}
diff --git a/hobo/deploy/__init__.py b/hobo/deploy/__init__.py
index 3d3a59a..e69de29 100644
--- a/hobo/deploy/__init__.py
+++ b/hobo/deploy/__init__.py
@@ -1,27 +0,0 @@
-# hobo - portal to configure and deploy applications
-# Copyright (C) 2015 Entr'ouvert
-#
-# This program is free software: you can redistribute it and/or modify it
-# under the terms of the GNU Affero General Public License as published
-# by the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-import django.apps
-
-
-class AppConfig(django.apps.AppConfig):
- name = 'hobo.deploy'
-
- def ready(self):
- from . import signals
-
-
-default_app_config = 'hobo.deploy.AppConfig'
diff --git a/hobo/deploy/apps.py b/hobo/deploy/apps.py
new file mode 100644
index 0000000..6cef39f
--- /dev/null
+++ b/hobo/deploy/apps.py
@@ -0,0 +1,24 @@
+# hobo - portal to configure and deploy applications
+# Copyright (C) 2015 Entr'ouvert
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU Affero General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+
+import django.apps
+
+
+class AppConfig(django.apps.AppConfig):
+ name = 'hobo.deploy'
+
+ def ready(self):
+ from . import signals
diff --git a/hobo/emails/forms.py b/hobo/emails/forms.py
index 1e64a27..ec062b3 100644
--- a/hobo/emails/forms.py
+++ b/hobo/emails/forms.py
@@ -15,7 +15,7 @@
# along with this program. If not, see .
from django import forms
from django.core.validators import validate_email
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
from hobo.emails.validators import validate_email_address, validate_email_domain, validate_email_spf
diff --git a/hobo/emails/validators.py b/hobo/emails/validators.py
index eb66893..787d40c 100644
--- a/hobo/emails/validators.py
+++ b/hobo/emails/validators.py
@@ -22,7 +22,7 @@ import dns.resolver
from django.conf import settings
from django.core.exceptions import ValidationError
from django.utils.encoding import force_bytes
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
from hobo.environment.utils import get_operational_services
diff --git a/hobo/emails/views.py b/hobo/emails/views.py
index 69b4765..e6eb967 100644
--- a/hobo/emails/views.py
+++ b/hobo/emails/views.py
@@ -15,7 +15,7 @@
# along with this program. If not, see .
from django.conf import settings
-from django.utils.translation import ugettext as _
+from django.utils.translation import gettext as _
from django.views.generic import TemplateView
from hobo.environment.forms import VariablesFormMixin
diff --git a/hobo/environment/forms.py b/hobo/environment/forms.py
index 31d21e0..02799d4 100644
--- a/hobo/environment/forms.py
+++ b/hobo/environment/forms.py
@@ -19,7 +19,7 @@ from django.conf import settings
from django.contrib import messages
from django.http import HttpResponseRedirect
from django.template.defaultfilters import slugify
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
from .models import Authentic, BiJoe, Chrono, Combo, Fargo, Hobo, Lingo, Passerelle, Variable, Wcs, Welco
from .utils import get_variable
diff --git a/hobo/environment/migrations/0001_initial.py b/hobo/environment/migrations/0001_initial.py
index 8e57679..eec1179 100644
--- a/hobo/environment/migrations/0001_initial.py
+++ b/hobo/environment/migrations/0001_initial.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('contenttypes', '0001_initial'),
]
diff --git a/hobo/environment/migrations/0002_authentic_use_as_idp_for_self.py b/hobo/environment/migrations/0002_authentic_use_as_idp_for_self.py
index 1c9eb51..3d51423 100644
--- a/hobo/environment/migrations/0002_authentic_use_as_idp_for_self.py
+++ b/hobo/environment/migrations/0002_authentic_use_as_idp_for_self.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0001_initial'),
]
diff --git a/hobo/environment/migrations/0003_auto_20150309_0811.py b/hobo/environment/migrations/0003_auto_20150309_0811.py
index 7492424..63162bc 100644
--- a/hobo/environment/migrations/0003_auto_20150309_0811.py
+++ b/hobo/environment/migrations/0003_auto_20150309_0811.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0002_authentic_use_as_idp_for_self'),
]
diff --git a/hobo/environment/migrations/0004_fargo.py b/hobo/environment/migrations/0004_fargo.py
index 34c57c7..da177f3 100644
--- a/hobo/environment/migrations/0004_fargo.py
+++ b/hobo/environment/migrations/0004_fargo.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0003_auto_20150309_0811'),
]
diff --git a/hobo/environment/migrations/0005_variable_label.py b/hobo/environment/migrations/0005_variable_label.py
index c58294c..0f612c3 100644
--- a/hobo/environment/migrations/0005_variable_label.py
+++ b/hobo/environment/migrations/0005_variable_label.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0004_fargo'),
]
diff --git a/hobo/environment/migrations/0006_auto_20150708_0830.py b/hobo/environment/migrations/0006_auto_20150708_0830.py
index 14cc203..1946435 100644
--- a/hobo/environment/migrations/0006_auto_20150708_0830.py
+++ b/hobo/environment/migrations/0006_auto_20150708_0830.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0005_variable_label'),
]
diff --git a/hobo/environment/migrations/0007_auto_20151008_1406.py b/hobo/environment/migrations/0007_auto_20151008_1406.py
index 7a25033..8381166 100644
--- a/hobo/environment/migrations/0007_auto_20151008_1406.py
+++ b/hobo/environment/migrations/0007_auto_20151008_1406.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0006_auto_20150708_0830'),
]
diff --git a/hobo/environment/migrations/0008_auto_20151021_1414.py b/hobo/environment/migrations/0008_auto_20151021_1414.py
index 97bd71b..2da01df 100644
--- a/hobo/environment/migrations/0008_auto_20151021_1414.py
+++ b/hobo/environment/migrations/0008_auto_20151021_1414.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0007_auto_20151008_1406'),
]
diff --git a/hobo/environment/migrations/0009_mandayejs.py b/hobo/environment/migrations/0009_mandayejs.py
index 87de17f..f330fcd 100644
--- a/hobo/environment/migrations/0009_mandayejs.py
+++ b/hobo/environment/migrations/0009_mandayejs.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0008_auto_20151021_1414'),
]
diff --git a/hobo/environment/migrations/0010_variable_auto.py b/hobo/environment/migrations/0010_variable_auto.py
index cc63e6d..42f75f3 100644
--- a/hobo/environment/migrations/0010_variable_auto.py
+++ b/hobo/environment/migrations/0010_variable_auto.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0009_mandayejs'),
]
diff --git a/hobo/environment/migrations/0011_chrono.py b/hobo/environment/migrations/0011_chrono.py
index 49139fd..21598f4 100644
--- a/hobo/environment/migrations/0011_chrono.py
+++ b/hobo/environment/migrations/0011_chrono.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0010_variable_auto'),
]
diff --git a/hobo/environment/migrations/0012_mandayejs_site_app.py b/hobo/environment/migrations/0012_mandayejs_site_app.py
index 5426f6e..d64ebce 100644
--- a/hobo/environment/migrations/0012_mandayejs_site_app.py
+++ b/hobo/environment/migrations/0012_mandayejs_site_app.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0011_chrono'),
]
diff --git a/hobo/environment/migrations/0013_auto_20160226_1633.py b/hobo/environment/migrations/0013_auto_20160226_1633.py
index d71154a..0427e0d 100644
--- a/hobo/environment/migrations/0013_auto_20160226_1633.py
+++ b/hobo/environment/migrations/0013_auto_20160226_1633.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0012_mandayejs_site_app'),
]
diff --git a/hobo/environment/migrations/0014_piwik.py b/hobo/environment/migrations/0014_piwik.py
index 314bab7..20a1fd7 100644
--- a/hobo/environment/migrations/0014_piwik.py
+++ b/hobo/environment/migrations/0014_piwik.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0013_auto_20160226_1633'),
]
diff --git a/hobo/environment/migrations/0015_corbo.py b/hobo/environment/migrations/0015_corbo.py
index 2c04ea4..024aec0 100644
--- a/hobo/environment/migrations/0015_corbo.py
+++ b/hobo/environment/migrations/0015_corbo.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0014_piwik'),
]
diff --git a/hobo/environment/migrations/0016_bijoe.py b/hobo/environment/migrations/0016_bijoe.py
index d40879a..3130ea7 100644
--- a/hobo/environment/migrations/0016_bijoe.py
+++ b/hobo/environment/migrations/0016_bijoe.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0015_corbo'),
]
diff --git a/hobo/environment/migrations/0017_hobo.py b/hobo/environment/migrations/0017_hobo.py
index 4997240..2f86050 100644
--- a/hobo/environment/migrations/0017_hobo.py
+++ b/hobo/environment/migrations/0017_hobo.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0016_bijoe'),
]
diff --git a/hobo/environment/migrations/0018_auto_20161102_1929.py b/hobo/environment/migrations/0018_auto_20161102_1929.py
index 3cda901..8f2aea5 100644
--- a/hobo/environment/migrations/0018_auto_20161102_1929.py
+++ b/hobo/environment/migrations/0018_auto_20161102_1929.py
@@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0017_hobo'),
]
diff --git a/hobo/environment/migrations/0019_delete_piwik.py b/hobo/environment/migrations/0019_delete_piwik.py
index 77e47a3..3f6e155 100644
--- a/hobo/environment/migrations/0019_delete_piwik.py
+++ b/hobo/environment/migrations/0019_delete_piwik.py
@@ -4,7 +4,6 @@ from django.db import migrations
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0018_auto_20161102_1929'),
]
diff --git a/hobo/environment/migrations/0020_delete_corbo_mandaye.py b/hobo/environment/migrations/0020_delete_corbo_mandaye.py
index 2616555..72a4101 100644
--- a/hobo/environment/migrations/0020_delete_corbo_mandaye.py
+++ b/hobo/environment/migrations/0020_delete_corbo_mandaye.py
@@ -5,7 +5,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0019_delete_piwik'),
]
diff --git a/hobo/environment/migrations/0021_base_url_validators.py b/hobo/environment/migrations/0021_base_url_validators.py
index 99354ec..3667d0e 100644
--- a/hobo/environment/migrations/0021_base_url_validators.py
+++ b/hobo/environment/migrations/0021_base_url_validators.py
@@ -5,7 +5,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0020_delete_corbo_mandaye'),
]
diff --git a/hobo/environment/migrations/0022_local_hobo.py b/hobo/environment/migrations/0022_local_hobo.py
index a0d6f40..f16281e 100644
--- a/hobo/environment/migrations/0022_local_hobo.py
+++ b/hobo/environment/migrations/0022_local_hobo.py
@@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0021_base_url_validators'),
]
diff --git a/hobo/environment/migrations/0023_populate_local_hobo.py b/hobo/environment/migrations/0023_populate_local_hobo.py
index 0740e32..6c07a73 100644
--- a/hobo/environment/migrations/0023_populate_local_hobo.py
+++ b/hobo/environment/migrations/0023_populate_local_hobo.py
@@ -33,7 +33,6 @@ def clean_local_hobo(apps, schema_editor):
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0022_local_hobo'),
]
diff --git a/hobo/environment/migrations/0024_remove_local_hobo.py b/hobo/environment/migrations/0024_remove_local_hobo.py
index 2a97b26..c486a36 100644
--- a/hobo/environment/migrations/0024_remove_local_hobo.py
+++ b/hobo/environment/migrations/0024_remove_local_hobo.py
@@ -31,7 +31,6 @@ def clean_local_hobo(apps, schema_editor):
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0023_populate_local_hobo'),
]
diff --git a/hobo/environment/migrations/0025_legacy_urls.py b/hobo/environment/migrations/0025_legacy_urls.py
index 2eac9dd..79daeac 100644
--- a/hobo/environment/migrations/0025_legacy_urls.py
+++ b/hobo/environment/migrations/0025_legacy_urls.py
@@ -5,7 +5,6 @@ from django.db import migrations
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0024_remove_local_hobo'),
]
diff --git a/hobo/environment/migrations/0026_lingo.py b/hobo/environment/migrations/0026_lingo.py
index b6fe3fe..64ddcbc 100644
--- a/hobo/environment/migrations/0026_lingo.py
+++ b/hobo/environment/migrations/0026_lingo.py
@@ -6,7 +6,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0025_legacy_urls'),
]
diff --git a/hobo/environment/migrations/0027_allow_long_slug.py b/hobo/environment/migrations/0027_allow_long_slug.py
index a446093..3fac945 100644
--- a/hobo/environment/migrations/0027_allow_long_slug.py
+++ b/hobo/environment/migrations/0027_allow_long_slug.py
@@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0026_lingo'),
]
diff --git a/hobo/environment/migrations/0028_clean_internal_ips.py b/hobo/environment/migrations/0028_clean_internal_ips.py
index 4649495..98f6fa3 100644
--- a/hobo/environment/migrations/0028_clean_internal_ips.py
+++ b/hobo/environment/migrations/0028_clean_internal_ips.py
@@ -16,7 +16,6 @@ def clean_internal_ips(apps, schema_editor):
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0027_allow_long_slug'),
]
diff --git a/hobo/environment/migrations/0029_unique_slug_and_title.py b/hobo/environment/migrations/0029_unique_slug_and_title.py
index 6716069..8d2784b 100644
--- a/hobo/environment/migrations/0029_unique_slug_and_title.py
+++ b/hobo/environment/migrations/0029_unique_slug_and_title.py
@@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
-
dependencies = [
('environment', '0028_clean_internal_ips'),
]
diff --git a/hobo/environment/models.py b/hobo/environment/models.py
index 33a849d..d41cc4d 100644
--- a/hobo/environment/models.py
+++ b/hobo/environment/models.py
@@ -25,15 +25,15 @@ import requests
from django.conf import settings
from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation
from django.contrib.contenttypes.models import ContentType
-from django.contrib.postgres.fields import JSONField
from django.core.cache import cache
from django.core.exceptions import ValidationError
from django.core.validators import URLValidator
from django.db import models
+from django.db.models import JSONField
from django.utils.crypto import get_random_string
-from django.utils.encoding import force_text
+from django.utils.encoding import force_str
from django.utils.timezone import now
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
from .utils import Zone, get_installed_services, get_local_key
@@ -188,7 +188,7 @@ class ServiceBase(models.Model):
if self.legacy_urls:
as_dict['legacy_urls'] = self.legacy_urls
as_dict['service-id'] = self.Extra.service_id
- as_dict['service-label'] = force_text(self.Extra.service_label)
+ as_dict['service-label'] = force_str(self.Extra.service_label)
as_dict['variables'] = {v.name: v.json for v in self.variables.all()}
as_dict['secondary'] = self.secondary
if self.get_saml_sp_metadata_url():
diff --git a/hobo/environment/templates/environment/home.html b/hobo/environment/templates/environment/home.html
index e807058..7fd883d 100644
--- a/hobo/environment/templates/environment/home.html
+++ b/hobo/environment/templates/environment/home.html
@@ -23,9 +23,9 @@
{% for service in installed_services %}