Compare commits
14 Commits
a28af6567f
...
ea55c5265e
Author | SHA1 | Date |
---|---|---|
Lauréline Guérin | ea55c5265e | |
Lauréline Guérin | a1e8c69eef | |
Lauréline Guérin | 3bb0a0c3ca | |
Benjamin Dauvergne | c2e6ad7214 | |
Frédéric Péters | bb21ef72e7 | |
Frédéric Péters | ead891796a | |
Frédéric Péters | bcb7a28797 | |
Valentin Deniaud | fba64847fa | |
Valentin Deniaud | 210b2a87e0 | |
Valentin Deniaud | 670bafd12a | |
Valentin Deniaud | 4c419c0695 | |
Valentin Deniaud | c5d83eb864 | |
Valentin Deniaud | cebdcf5bbf | |
Valentin Deniaud | 95d05a0f87 |
|
@ -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']
|
||||
|
|
2
README
2
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.)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
default_app_config = 'hobo.agent.authentic2.apps.Authentic2AgentConfig'
|
|
@ -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
|
||||
|
|
|
@ -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(
|
||||
{
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('auth', '0001_initial'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('common', '0001_initial'),
|
||||
]
|
||||
|
|
|
@ -5,7 +5,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('common', '0002_auto_20160105_1702'),
|
||||
]
|
||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('common', '0003_auto_20200707_1656'),
|
||||
]
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
# Generated by Django 2.2.26 on 2023-01-03 09:30
|
||||
|
||||
import django.contrib.postgres.fields.jsonb
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('common', '0004_alter_role_uuid'),
|
||||
|
@ -21,7 +19,7 @@ class Migration(migrations.Migration):
|
|||
'id',
|
||||
models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
('data', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
|
||||
('data', models.JSONField(default=dict)),
|
||||
(
|
||||
'user',
|
||||
models.OneToOneField(
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
default_app_config = 'hobo.agent.hobo.apps.HoboAgentConfig'
|
|
@ -15,7 +15,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
# Generated by Django 1.11.29 on 2022-01-09 13:16
|
||||
|
||||
import django.contrib.postgres.fields.jsonb
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = []
|
||||
|
@ -38,7 +36,7 @@ class Migration(migrations.Migration):
|
|||
('type', models.CharField(max_length=25, verbose_name='Type')),
|
||||
('slug', models.SlugField(max_length=500, verbose_name='Slug')),
|
||||
('name', models.CharField(max_length=500, verbose_name='Name')),
|
||||
('cache', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict)),
|
||||
('cache', models.JSONField(blank=True, default=dict)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
|
@ -73,7 +71,7 @@ class Migration(migrations.Migration):
|
|||
('last_update_timestamp', models.DateTimeField(auto_now=True)),
|
||||
(
|
||||
'deployment_status',
|
||||
django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict),
|
||||
models.JSONField(blank=True, default=dict),
|
||||
),
|
||||
(
|
||||
'application',
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('applications', '0001_initial'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('applications', '0002_icon'),
|
||||
]
|
||||
|
|
|
@ -13,7 +13,6 @@ def forwards(apps, schema_editor):
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('applications', '0003_version_num_notes'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('applications', '0004_version_num_notes'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('applications', '0005_version_num_notes'),
|
||||
]
|
||||
|
|
|
@ -6,7 +6,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('applications', '0006_documentation_url'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('applications', '0007_asyncjob'),
|
||||
]
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
import django.contrib.postgres.fields.jsonb
|
||||
from django.db import migrations
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('applications', '0008_element_error'),
|
||||
]
|
||||
|
@ -12,6 +10,6 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='asyncjob',
|
||||
name='progression_urls',
|
||||
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict),
|
||||
field=models.JSONField(blank=True, default=dict),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('applications', '0009_job_progression'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('applications', '0010_relation_error'),
|
||||
]
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
container.show();
|
||||
} else {
|
||||
$(elem).hide();
|
||||
if (!$('label:visible', container).lenght) {
|
||||
if (!$('label:visible', container).length) {
|
||||
container.hide();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,4 +11,5 @@
|
|||
<button class="submit-button">{% trans "Create" %}</button>
|
||||
<a class="cancel" href=".">{% trans "Cancel" %}</a>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
|
@ -11,4 +11,5 @@
|
|||
<button class="submit-button">{% trans "Submit" %}</button>
|
||||
<a class="cancel" href="..">{% trans "Cancel" %}</a>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
|
@ -27,7 +27,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
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<div class="buttons">
|
||||
<button class="submit-button">{% trans "Save" %}</button>
|
||||
<button class="submit-button"
|
||||
name="toggle-current-ip">{% if current_ip_debug %}{% trans "Remove current IP" %}{% else %}{% trans "Add current IP" %}{% endif %} - {{ view.current_ip }}</button>
|
||||
name="toggle-current-ip">{% if current_ip_debug %}{% trans "Remove current IP" %}{% else %}{% trans "Add current IP" %}{% endif %} - {{ view.current_ip }}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
import django.apps
|
||||
|
||||
|
||||
class AppConfig(django.apps.AppConfig):
|
||||
name = 'hobo.deploy'
|
||||
|
||||
def ready(self):
|
||||
from . import signals
|
||||
|
||||
|
||||
default_app_config = 'hobo.deploy.AppConfig'
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
import django.apps
|
||||
|
||||
|
||||
class AppConfig(django.apps.AppConfig):
|
||||
name = 'hobo.deploy'
|
||||
|
||||
def ready(self):
|
||||
from . import signals
|
|
@ -15,7 +15,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('contenttypes', '0001_initial'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0001_initial'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0002_authentic_use_as_idp_for_self'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0003_auto_20150309_0811'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0004_fargo'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0005_variable_label'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0006_auto_20150708_0830'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0007_auto_20151008_1406'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0008_auto_20151021_1414'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0009_mandayejs'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0010_variable_auto'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0011_chrono'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0012_mandayejs_site_app'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0013_auto_20160226_1633'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0014_piwik'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0015_corbo'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0016_bijoe'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0017_hobo'),
|
||||
]
|
||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0018_auto_20161102_1929'),
|
||||
]
|
||||
|
|
|
@ -5,7 +5,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0019_delete_piwik'),
|
||||
]
|
||||
|
|
|
@ -5,7 +5,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0020_delete_corbo_mandaye'),
|
||||
]
|
||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0021_base_url_validators'),
|
||||
]
|
||||
|
|
|
@ -33,7 +33,6 @@ def clean_local_hobo(apps, schema_editor):
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0022_local_hobo'),
|
||||
]
|
||||
|
|
|
@ -31,7 +31,6 @@ def clean_local_hobo(apps, schema_editor):
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0023_populate_local_hobo'),
|
||||
]
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
# Generated by Django 2.2.24 on 2021-12-02 13:55
|
||||
|
||||
import django.contrib.postgres.fields.jsonb
|
||||
from django.db import migrations
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0024_remove_local_hobo'),
|
||||
]
|
||||
|
@ -14,46 +12,46 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='authentic',
|
||||
name='legacy_urls',
|
||||
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, null=True),
|
||||
field=models.JSONField(blank=True, default=list, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='bijoe',
|
||||
name='legacy_urls',
|
||||
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, null=True),
|
||||
field=models.JSONField(blank=True, default=list, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='chrono',
|
||||
name='legacy_urls',
|
||||
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, null=True),
|
||||
field=models.JSONField(blank=True, default=list, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='combo',
|
||||
name='legacy_urls',
|
||||
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, null=True),
|
||||
field=models.JSONField(blank=True, default=list, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='fargo',
|
||||
name='legacy_urls',
|
||||
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, null=True),
|
||||
field=models.JSONField(blank=True, default=list, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='hobo',
|
||||
name='legacy_urls',
|
||||
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, null=True),
|
||||
field=models.JSONField(blank=True, default=list, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='passerelle',
|
||||
name='legacy_urls',
|
||||
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, null=True),
|
||||
field=models.JSONField(blank=True, default=list, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='wcs',
|
||||
name='legacy_urls',
|
||||
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, null=True),
|
||||
field=models.JSONField(blank=True, default=list, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='welco',
|
||||
name='legacy_urls',
|
||||
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, null=True),
|
||||
field=models.JSONField(blank=True, default=list, null=True),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
# Generated by Django 3.2.13 on 2022-05-17 21:02
|
||||
|
||||
import django.contrib.postgres.fields.jsonb
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0025_legacy_urls'),
|
||||
]
|
||||
|
@ -31,7 +29,7 @@ class Migration(migrations.Migration):
|
|||
),
|
||||
(
|
||||
'legacy_urls',
|
||||
django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, null=True),
|
||||
models.JSONField(blank=True, default=list, null=True),
|
||||
),
|
||||
('secret_key', models.CharField(max_length=60, verbose_name='Secret Key')),
|
||||
('template_name', models.CharField(blank=True, max_length=60, verbose_name='Template')),
|
||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0026_lingo'),
|
||||
]
|
||||
|
|
|
@ -16,7 +16,6 @@ def clean_internal_ips(apps, schema_editor):
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0027_allow_long_slug'),
|
||||
]
|
||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('environment', '0028_clean_internal_ips'),
|
||||
]
|
||||
|
|
|
@ -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():
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
{% for service in installed_services %}
|
||||
<div data-service-id="{{ service.Extra.service_id }}"
|
||||
data-slug="{{ service.slug }}"
|
||||
class="bo-block service-block {{ service.Extra.service_id }}-block"
|
||||
{% if service.wants_frequent_checks %}data-wants-check="true"{% endif %}>
|
||||
data-slug="{{ service.slug }}"
|
||||
class="bo-block service-block {{ service.Extra.service_id }}-block"
|
||||
{% if service.wants_frequent_checks %}data-wants-check="true"{% endif %}>
|
||||
<h3>{{ service.title }} <span class="slug">[{{service.slug}},
|
||||
<a href="{{service.base_url}}">{{service.base_url}}</a>]</span></h3>
|
||||
{% if not service.is_operational %}
|
||||
|
|
|
@ -22,7 +22,7 @@ from django.conf import settings
|
|||
from django.core.management.base import CommandError
|
||||
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.middleware.utils import StoreRequestMiddleware
|
||||
from hobo.multitenant.settings_loaders import KnownServices
|
||||
|
@ -48,7 +48,7 @@ def get_operational_services():
|
|||
|
||||
|
||||
def get_local_key(url):
|
||||
secret1 = force_text(settings.SECRET_KEY)
|
||||
secret1 = force_str(settings.SECRET_KEY)
|
||||
secret2 = url
|
||||
return KnownServices.shared_secret(secret1, secret2)[:40]
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ from django.contrib.contenttypes.models import ContentType
|
|||
from django.http import Http404, HttpResponse, HttpResponseRedirect, JsonResponse
|
||||
from django.shortcuts import get_object_or_404
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.encoding import force_str
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.views.generic import View
|
||||
from django.views.generic.base import TemplateView
|
||||
from django.views.generic.edit import CreateView, DeleteView, FormView, UpdateView
|
||||
|
@ -213,7 +213,7 @@ class ImportView(FormView):
|
|||
|
||||
def form_valid(self, form):
|
||||
try:
|
||||
parameters_json = json.loads(force_text(self.request.FILES['parameters_json'].read()))
|
||||
parameters_json = json.loads(force_str(self.request.FILES['parameters_json'].read()))
|
||||
except ValueError:
|
||||
form.add_error('parameters_json', _('File is not in the expected JSON format.'))
|
||||
return self.form_invalid(form)
|
||||
|
@ -230,7 +230,6 @@ class ExportView(View):
|
|||
|
||||
|
||||
def operational_check_view(request, service, slug, **kwargs):
|
||||
|
||||
for klass in AVAILABLE_SERVICES:
|
||||
if klass.Extra.service_id == service:
|
||||
break
|
||||
|
|
|
@ -8,7 +8,6 @@ else:
|
|||
|
||||
|
||||
class HoboForm(ModelForm):
|
||||
|
||||
required_css_class = 'required'
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django import forms
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class MaintenanceForm(forms.Form):
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
import xml.etree.ElementTree as etree
|
||||
|
||||
from django import forms
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class SettingsForm(forms.Form):
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import django
|
||||
from django.http import JsonResponse
|
||||
from django.middleware.common import CommonMiddleware
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class HoboCommonMiddleware(CommonMiddleware):
|
||||
|
|
|
@ -14,7 +14,7 @@ class CORSMiddleware(MiddlewareMixin):
|
|||
view/exception middleware along with the requested view;
|
||||
it will call any response middlewares
|
||||
"""
|
||||
if request.method == 'OPTIONS' and "HTTP_ACCESS_CONTROL_REQUEST_METHOD" in request.META:
|
||||
if request.method == 'OPTIONS' and "access-control-request-method" in request.headers:
|
||||
response = HttpResponse()
|
||||
return response
|
||||
return None
|
||||
|
|
|
@ -18,7 +18,7 @@ from ipaddress import ip_address, ip_network
|
|||
|
||||
from django.conf import settings
|
||||
from django.template.response import TemplateResponse
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
|
||||
def pass_through(request):
|
||||
|
|
|
@ -10,7 +10,7 @@ class XForwardedForMiddleware(MiddlewareMixin):
|
|||
|
||||
def process_request(self, request):
|
||||
if getattr(settings, 'USE_X_FORWARDED_FOR', False):
|
||||
if 'HTTP_X_FORWARDED_FOR' in request.META:
|
||||
if 'x-forwarded-for' in request.headers:
|
||||
ip = request.headers.get('X-Forwarded-For', '').split(",")[0].strip()
|
||||
if ip:
|
||||
request.META['REMOTE_ADDR'] = ip
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
default_app_config = 'hobo.multitenant.apps.MultitenantAppConfig'
|
||||
|
||||
# import the context_processors module so it gets to compute the versions hash
|
||||
# early on.
|
||||
from hobo import context_processors
|
||||
|
|
|
@ -13,7 +13,7 @@ from django.core.exceptions import ImproperlyConfigured
|
|||
from django.core.management import call_command, get_commands, load_command_class
|
||||
from django.core.management.base import BaseCommand, CommandError, SystemCheckError, handle_default_options
|
||||
from django.db import connection, connections
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.encoding import force_str
|
||||
|
||||
from hobo.multitenant.management.commands import InteractiveTenantOption
|
||||
from hobo.multitenant.middleware import TenantMiddleware
|
||||
|
@ -26,12 +26,12 @@ def exception_to_text(e):
|
|||
pass
|
||||
|
||||
try:
|
||||
return force_text(str(e), errors='ignore')
|
||||
return force_str(str(e), errors='ignore')
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
try:
|
||||
return force_text(repr(e), errors='ignore')
|
||||
return force_str(repr(e), errors='ignore')
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
|
|
@ -17,7 +17,8 @@ class MellonAdapter(DefaultAdapter):
|
|||
hobo_json_path = os.path.join(tenant_dir, 'hobo.json')
|
||||
if not os.path.exists(hobo_json_path):
|
||||
return []
|
||||
hobo_json = json.load(open(hobo_json_path))
|
||||
with open(hobo_json_path) as fd:
|
||||
hobo_json = json.load(fd)
|
||||
# always look for the first active identity provider in the list of
|
||||
# services
|
||||
for service in hobo_json.get('services'):
|
||||
|
|
|
@ -34,7 +34,8 @@ class Tenant(TenantMixin):
|
|||
|
||||
def get_hobo_json(self):
|
||||
if not self.__hobo_json:
|
||||
self.__hobo_json = json.load(open(os.path.join(self.get_directory(), 'hobo.json')))
|
||||
with open(os.path.join(self.get_directory(), 'hobo.json')) as fd:
|
||||
self.__hobo_json = json.load(fd)
|
||||
return self.__hobo_json
|
||||
|
||||
def get_service(self):
|
||||
|
@ -44,7 +45,8 @@ class Tenant(TenantMixin):
|
|||
|
||||
def get_base_url(self):
|
||||
if os.path.exists(os.path.join(self.get_directory(), 'base_url')):
|
||||
return open(os.path.join(self.get_directory(), 'base_url')).read().strip().strip('/')
|
||||
with open(os.path.join(self.get_directory(), 'base_url')) as fd:
|
||||
return fd.read().strip().strip('/')
|
||||
return 'https://%s' % self.domain_url
|
||||
|
||||
def build_absolute_uri(self, location):
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django import forms
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class EditFullNameTemplateForm(forms.Form):
|
||||
|
|
|
@ -3,7 +3,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = []
|
||||
|
||||
operations = [
|
||||
|
|
|
@ -24,7 +24,6 @@ def add_initial_data(apps, schema_editor):
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('profile', '0001_initial'),
|
||||
]
|
||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('profile', '0002_add_data'),
|
||||
]
|
||||
|
|
|
@ -5,7 +5,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('profile', '0003_attributedefinition_searchable'),
|
||||
]
|
||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('profile', '0004_auto_20200518_1810'),
|
||||
]
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
from django.core.validators import RegexValidator
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
validate_attribute_name = RegexValidator(
|
||||
r'^[a-z][a-z0-9_]*\Z',
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
from django.shortcuts import redirect
|
||||
from django.urls import reverse, reverse_lazy
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import CreateView, ListView, RedirectView, TemplateView, UpdateView
|
||||
|
||||
from hobo.deploy.signals import notify_agents
|
||||
|
|
|
@ -23,7 +23,7 @@ from django.conf import settings
|
|||
from django.db import connection
|
||||
from django.http import HttpResponseBadRequest, HttpResponseForbidden, JsonResponse
|
||||
from django.utils.deprecation import MiddlewareMixin
|
||||
from django.utils.encoding import force_bytes, force_text
|
||||
from django.utils.encoding import force_bytes, force_str
|
||||
|
||||
from hobo.provisionning.utils import NotificationProcessing
|
||||
from hobo.rest_authentication import PublikAuthentication, PublikAuthenticationFailed
|
||||
|
@ -46,7 +46,7 @@ class ProvisionningMiddleware(MiddlewareMixin, NotificationProcessing):
|
|||
return HttpResponseForbidden()
|
||||
|
||||
try:
|
||||
notification = json.loads(force_text(request.body))
|
||||
notification = json.loads(force_str(request.body))
|
||||
except ValueError:
|
||||
return HttpResponseBadRequest()
|
||||
if not isinstance(notification, dict) or 'objects' not in notification:
|
||||
|
|
|
@ -56,7 +56,6 @@ class AnonymousAdminServiceUser(AnonymousUser):
|
|||
|
||||
|
||||
class APIClientUser:
|
||||
|
||||
is_active = True
|
||||
is_anonymous = False
|
||||
is_authenticated = True
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django import forms
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class RobotsTxtForm(forms.Form):
|
||||
|
|
|
@ -10,7 +10,7 @@ and to disable DEBUG mode in production.
|
|||
import os
|
||||
|
||||
from django.conf import global_settings
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
||||
|
@ -116,6 +116,8 @@ DATABASES = {
|
|||
}
|
||||
}
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/1.6/topics/i18n/
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
from django import forms
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.core.validators import RegexValidator
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from hobo.utils import TemplateError, get_templated_url
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
|
|
|
@ -20,7 +20,6 @@ def helloworld(request):
|
|||
|
||||
|
||||
class AuthenticatedTestView(APIView):
|
||||
|
||||
permission_classes = [permissions.IsAuthenticated]
|
||||
|
||||
def get(self, request):
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django import forms
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class ThemeOptionsForm(forms.Form):
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue