diff options
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/toaster/bldcollector/urls.py | 2 | ||||
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/models.py | 4 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/urls.py | 2 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/views.py | 4 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/widgets.py | 5 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastermain/management/commands/checksocket.py | 4 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastermain/urls.py | 2 |
7 files changed, 12 insertions, 11 deletions
diff --git a/bitbake/lib/toaster/bldcollector/urls.py b/bitbake/lib/toaster/bldcollector/urls.py index efd67a81a5..3c34070351 100644 --- a/bitbake/lib/toaster/bldcollector/urls.py +++ b/bitbake/lib/toaster/bldcollector/urls.py | |||
@@ -6,7 +6,7 @@ | |||
6 | # SPDX-License-Identifier: GPL-2.0-only | 6 | # SPDX-License-Identifier: GPL-2.0-only |
7 | # | 7 | # |
8 | 8 | ||
9 | from django.conf.urls import url | 9 | from django.urls import re_path as url |
10 | 10 | ||
11 | import bldcollector.views | 11 | import bldcollector.views |
12 | 12 | ||
diff --git a/bitbake/lib/toaster/bldcontrol/models.py b/bitbake/lib/toaster/bldcontrol/models.py index c2f302da24..42750e7180 100644 --- a/bitbake/lib/toaster/bldcontrol/models.py +++ b/bitbake/lib/toaster/bldcontrol/models.py | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | from __future__ import unicode_literals | 5 | from __future__ import unicode_literals |
6 | from django.db import models | 6 | from django.db import models |
7 | from django.utils.encoding import force_text | 7 | from django.utils.encoding import force_str |
8 | from orm.models import Project, Build, Layer_Version | 8 | from orm.models import Project, Build, Layer_Version |
9 | 9 | ||
10 | import logging | 10 | import logging |
@@ -124,7 +124,7 @@ class BuildRequest(models.Model): | |||
124 | return self.brvariable_set.get(name="MACHINE").value | 124 | return self.brvariable_set.get(name="MACHINE").value |
125 | 125 | ||
126 | def __str__(self): | 126 | def __str__(self): |
127 | return force_text('%s %s' % (self.project, self.get_state_display())) | 127 | return force_str('%s %s' % (self.project, self.get_state_display())) |
128 | 128 | ||
129 | # These tables specify the settings for running an actual build. | 129 | # These tables specify the settings for running an actual build. |
130 | # They MUST be kept in sync with the tables in orm.models.Project* | 130 | # They MUST be kept in sync with the tables in orm.models.Project* |
diff --git a/bitbake/lib/toaster/toastergui/urls.py b/bitbake/lib/toaster/toastergui/urls.py index d2df4e6048..bc3b0c79d8 100644 --- a/bitbake/lib/toaster/toastergui/urls.py +++ b/bitbake/lib/toaster/toastergui/urls.py | |||
@@ -6,7 +6,7 @@ | |||
6 | # SPDX-License-Identifier: GPL-2.0-only | 6 | # SPDX-License-Identifier: GPL-2.0-only |
7 | # | 7 | # |
8 | 8 | ||
9 | from django.conf.urls import url | 9 | from django.urls import re_path as url |
10 | from django.views.generic import RedirectView | 10 | from django.views.generic import RedirectView |
11 | 11 | ||
12 | from toastergui import tables | 12 | from toastergui import tables |
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index a571b8cc18..bf92510cdc 100644 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -670,11 +670,11 @@ def xhr_dirinfo(request, build_id, target_id): | |||
670 | return HttpResponse(_get_dir_entries(build_id, target_id, top), content_type = "application/json") | 670 | return HttpResponse(_get_dir_entries(build_id, target_id, top), content_type = "application/json") |
671 | 671 | ||
672 | from django.utils.functional import Promise | 672 | from django.utils.functional import Promise |
673 | from django.utils.encoding import force_text | 673 | from django.utils.encoding import force_str |
674 | class LazyEncoder(json.JSONEncoder): | 674 | class LazyEncoder(json.JSONEncoder): |
675 | def default(self, obj): | 675 | def default(self, obj): |
676 | if isinstance(obj, Promise): | 676 | if isinstance(obj, Promise): |
677 | return force_text(obj) | 677 | return force_str(obj) |
678 | return super(LazyEncoder, self).default(obj) | 678 | return super(LazyEncoder, self).default(obj) |
679 | 679 | ||
680 | from toastergui.templatetags.projecttags import filtered_filesizeformat | 680 | from toastergui.templatetags.projecttags import filtered_filesizeformat |
diff --git a/bitbake/lib/toaster/toastergui/widgets.py b/bitbake/lib/toaster/toastergui/widgets.py index ceff52942e..53696912a4 100644 --- a/bitbake/lib/toaster/toastergui/widgets.py +++ b/bitbake/lib/toaster/toastergui/widgets.py | |||
@@ -7,6 +7,7 @@ | |||
7 | # | 7 | # |
8 | 8 | ||
9 | from django.views.generic import View, TemplateView | 9 | from django.views.generic import View, TemplateView |
10 | from django.utils.decorators import method_decorator | ||
10 | from django.views.decorators.cache import cache_control | 11 | from django.views.decorators.cache import cache_control |
11 | from django.shortcuts import HttpResponse | 12 | from django.shortcuts import HttpResponse |
12 | from django.core.cache import cache | 13 | from django.core.cache import cache |
@@ -63,8 +64,8 @@ class ToasterTable(TemplateView): | |||
63 | self.default_orderby = "" | 64 | self.default_orderby = "" |
64 | 65 | ||
65 | # prevent HTTP caching of table data | 66 | # prevent HTTP caching of table data |
66 | @cache_control(must_revalidate=True, | 67 | @method_decorator(cache_control(must_revalidate=True, |
67 | max_age=0, no_store=True, no_cache=True) | 68 | max_age=0, no_store=True, no_cache=True)) |
68 | def dispatch(self, *args, **kwargs): | 69 | def dispatch(self, *args, **kwargs): |
69 | return super(ToasterTable, self).dispatch(*args, **kwargs) | 70 | return super(ToasterTable, self).dispatch(*args, **kwargs) |
70 | 71 | ||
diff --git a/bitbake/lib/toaster/toastermain/management/commands/checksocket.py b/bitbake/lib/toaster/toastermain/management/commands/checksocket.py index 811fd5d516..b2c002da7a 100644 --- a/bitbake/lib/toaster/toastermain/management/commands/checksocket.py +++ b/bitbake/lib/toaster/toastermain/management/commands/checksocket.py | |||
@@ -13,7 +13,7 @@ import errno | |||
13 | import socket | 13 | import socket |
14 | 14 | ||
15 | from django.core.management.base import BaseCommand, CommandError | 15 | from django.core.management.base import BaseCommand, CommandError |
16 | from django.utils.encoding import force_text | 16 | from django.utils.encoding import force_str |
17 | 17 | ||
18 | DEFAULT_ADDRPORT = "0.0.0.0:8000" | 18 | DEFAULT_ADDRPORT = "0.0.0.0:8000" |
19 | 19 | ||
@@ -51,7 +51,7 @@ class Command(BaseCommand): | |||
51 | if hasattr(err, 'errno') and err.errno in errors: | 51 | if hasattr(err, 'errno') and err.errno in errors: |
52 | errtext = errors[err.errno] | 52 | errtext = errors[err.errno] |
53 | else: | 53 | else: |
54 | errtext = force_text(err) | 54 | errtext = force_str(err) |
55 | raise CommandError(errtext) | 55 | raise CommandError(errtext) |
56 | 56 | ||
57 | self.stdout.write("OK") | 57 | self.stdout.write("OK") |
diff --git a/bitbake/lib/toaster/toastermain/urls.py b/bitbake/lib/toaster/toastermain/urls.py index 5fb520b384..0360302668 100644 --- a/bitbake/lib/toaster/toastermain/urls.py +++ b/bitbake/lib/toaster/toastermain/urls.py | |||
@@ -6,7 +6,7 @@ | |||
6 | # SPDX-License-Identifier: GPL-2.0-only | 6 | # SPDX-License-Identifier: GPL-2.0-only |
7 | # | 7 | # |
8 | 8 | ||
9 | from django.conf.urls import include, url | 9 | from django.urls import re_path as url, include |
10 | from django.views.generic import RedirectView, TemplateView | 10 | from django.views.generic import RedirectView, TemplateView |
11 | from django.views.decorators.cache import never_cache | 11 | from django.views.decorators.cache import never_cache |
12 | import bldcollector.views | 12 | import bldcollector.views |