summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/toaster/bldcollector/urls.py10
-rw-r--r--bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py6
-rw-r--r--bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py6
-rw-r--r--bitbake/lib/toaster/orm/management/commands/lsupdates.py8
-rw-r--r--bitbake/lib/toaster/toastergui/urls.py61
-rw-r--r--bitbake/lib/toaster/toastermain/management/commands/buildslist.py6
-rw-r--r--bitbake/lib/toaster/toastermain/settings.py70
-rw-r--r--bitbake/lib/toaster/toastermain/urls.py8
8 files changed, 96 insertions, 79 deletions
diff --git a/bitbake/lib/toaster/bldcollector/urls.py b/bitbake/lib/toaster/bldcollector/urls.py
index 64722f2cdc..076afdb722 100644
--- a/bitbake/lib/toaster/bldcollector/urls.py
+++ b/bitbake/lib/toaster/bldcollector/urls.py
@@ -1,7 +1,7 @@
1# 1#
2# BitBake Toaster Implementation 2# BitBake Toaster Implementation
3# 3#
4# Copyright (C) 2014 Intel Corporation 4# Copyright (C) 2014-2017 Intel Corporation
5# 5#
6# This program is free software; you can redistribute it and/or modify 6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License version 2 as 7# it under the terms of the GNU General Public License version 2 as
@@ -19,7 +19,9 @@
19 19
20from django.conf.urls import patterns, include, url 20from django.conf.urls import patterns, include, url
21 21
22urlpatterns = patterns('bldcollector.views', 22import bldcollector.views
23
24urlpatterns = [
23 # landing point for pushing a bitbake_eventlog.json file to this toaster instace 25 # landing point for pushing a bitbake_eventlog.json file to this toaster instace
24 url(r'^eventfile$', 'eventfile', name='eventfile'), 26 url(r'^eventfile$', bldcollector.views.eventfile, name='eventfile'),
25 ) 27]
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py b/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
index 2ed994f61f..d11166ef53 100644
--- a/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
+++ b/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
@@ -1,4 +1,4 @@
1from django.core.management.base import NoArgsCommand, CommandError 1from django.core.management.base import BaseCommand, CommandError
2from django.db import transaction 2from django.db import transaction
3 3
4from django.core.management import call_command 4from django.core.management import call_command
@@ -18,7 +18,7 @@ def DN(path):
18 return os.path.dirname(path) 18 return os.path.dirname(path)
19 19
20 20
21class Command(NoArgsCommand): 21class Command(BaseCommand):
22 args = "" 22 args = ""
23 help = "Verifies that the configured settings are valid and usable, or prompts the user to fix the settings." 23 help = "Verifies that the configured settings are valid and usable, or prompts the user to fix the settings."
24 24
@@ -152,7 +152,7 @@ class Command(NoArgsCommand):
152 152
153 153
154 154
155 def handle_noargs(self, **options): 155 def handle(self, **options):
156 retval = 0 156 retval = 0
157 retval += self._verify_build_environment() 157 retval += self._verify_build_environment()
158 retval += self._verify_default_settings() 158 retval += self._verify_default_settings()
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
index df11f9d162..8eacb5e896 100644
--- a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
+++ b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
@@ -1,4 +1,4 @@
1from django.core.management.base import NoArgsCommand 1from django.core.management.base import BaseCommand
2from django.db import transaction 2from django.db import transaction
3from django.db.models import Q 3from django.db.models import Q
4 4
@@ -16,7 +16,7 @@ import os
16logger = logging.getLogger("toaster") 16logger = logging.getLogger("toaster")
17 17
18 18
19class Command(NoArgsCommand): 19class Command(BaseCommand):
20 args = "" 20 args = ""
21 help = "Schedules and executes build requests as possible. "\ 21 help = "Schedules and executes build requests as possible. "\
22 "Does not return (interrupt with Ctrl-C)" 22 "Does not return (interrupt with Ctrl-C)"
@@ -168,7 +168,7 @@ class Command(NoArgsCommand):
168 except Exception as e: 168 except Exception as e:
169 logger.warn("runbuilds: schedule exception %s" % str(e)) 169 logger.warn("runbuilds: schedule exception %s" % str(e))
170 170
171 def handle_noargs(self, **options): 171 def handle(self, **options):
172 pidfile_path = os.path.join(os.environ.get("BUILDDIR", "."), 172 pidfile_path = os.path.join(os.environ.get("BUILDDIR", "."),
173 ".runbuilds.pid") 173 ".runbuilds.pid")
174 174
diff --git a/bitbake/lib/toaster/orm/management/commands/lsupdates.py b/bitbake/lib/toaster/orm/management/commands/lsupdates.py
index 68c6c423d8..90f07c9dc5 100644
--- a/bitbake/lib/toaster/orm/management/commands/lsupdates.py
+++ b/bitbake/lib/toaster/orm/management/commands/lsupdates.py
@@ -4,7 +4,7 @@
4# 4#
5# BitBake Toaster Implementation 5# BitBake Toaster Implementation
6# 6#
7# Copyright (C) 2016 Intel Corporation 7# Copyright (C) 2016-2017 Intel Corporation
8# 8#
9# This program is free software; you can redistribute it and/or modify 9# This program is free software; you can redistribute it and/or modify
10# it under the terms of the GNU General Public License version 2 as 10# it under the terms of the GNU General Public License version 2 as
@@ -19,7 +19,7 @@
19# with this program; if not, write to the Free Software Foundation, Inc., 19# with this program; if not, write to the Free Software Foundation, Inc.,
20# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 21
22from django.core.management.base import NoArgsCommand 22from django.core.management.base import BaseCommand
23 23
24from orm.models import LayerSource, Layer, Release, Layer_Version 24from orm.models import LayerSource, Layer, Release, Layer_Version
25from orm.models import LayerVersionDependency, Machine, Recipe 25from orm.models import LayerVersionDependency, Machine, Recipe
@@ -56,7 +56,7 @@ class Spinner(threading.Thread):
56 self.signal = False 56 self.signal = False
57 57
58 58
59class Command(NoArgsCommand): 59class Command(BaseCommand):
60 args = "" 60 args = ""
61 help = "Updates locally cached information from a layerindex server" 61 help = "Updates locally cached information from a layerindex server"
62 62
@@ -307,5 +307,5 @@ class Command(NoArgsCommand):
307 307
308 os.system('setterm -cursor on') 308 os.system('setterm -cursor on')
309 309
310 def handle_noargs(self, **options): 310 def handle(self, **options):
311 self.update() 311 self.update()
diff --git a/bitbake/lib/toaster/toastergui/urls.py b/bitbake/lib/toaster/toastergui/urls.py
index d92f190aed..1ad79a4dd3 100644
--- a/bitbake/lib/toaster/toastergui/urls.py
+++ b/bitbake/lib/toaster/toastergui/urls.py
@@ -1,7 +1,7 @@
1# 1#
2# BitBake Toaster Implementation 2# BitBake Toaster Implementation
3# 3#
4# Copyright (C) 2013 Intel Corporation 4# Copyright (C) 2013-2017 Intel Corporation
5# 5#
6# This program is free software; you can redistribute it and/or modify 6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License version 2 as 7# it under the terms of the GNU General Public License version 2 as
@@ -25,49 +25,50 @@ from toastergui import buildtables
25from toastergui import typeaheads 25from toastergui import typeaheads
26from toastergui import api 26from toastergui import api
27from toastergui import widgets 27from toastergui import widgets
28from toastergui import views
28 29
29urlpatterns = patterns('toastergui.views', 30urlpatterns = [
30 # landing page 31 # landing page
31 url(r'^landing/$', 'landing', name='landing'), 32 url(r'^landing/$', views.landing, name='landing'),
32 33
33 url(r'^builds/$', 34 url(r'^builds/$',
34 tables.AllBuildsTable.as_view(template_name="builds-toastertable.html"), 35 tables.AllBuildsTable.as_view(template_name="builds-toastertable.html"),
35 name='all-builds'), 36 name='all-builds'),
36 37
37 # build info navigation 38 # build info navigation
38 url(r'^build/(?P<build_id>\d+)$', 'builddashboard', name="builddashboard"), 39 url(r'^build/(?P<build_id>\d+)$', views.builddashboard, name="builddashboard"),
39 url(r'^build/(?P<build_id>\d+)/tasks/$', 40 url(r'^build/(?P<build_id>\d+)/tasks/$',
40 buildtables.BuildTasksTable.as_view( 41 buildtables.BuildTasksTable.as_view(
41 template_name="buildinfo-toastertable.html"), 42 template_name="buildinfo-toastertable.html"),
42 name='tasks'), 43 name='tasks'),
43 44
44 url(r'^build/(?P<build_id>\d+)/task/(?P<task_id>\d+)$', 'task', name='task'), 45 url(r'^build/(?P<build_id>\d+)/task/(?P<task_id>\d+)$', views.task, name='task'),
45 46
46 url(r'^build/(?P<build_id>\d+)/recipes/$', 47 url(r'^build/(?P<build_id>\d+)/recipes/$',
47 buildtables.BuiltRecipesTable.as_view( 48 buildtables.BuiltRecipesTable.as_view(
48 template_name="buildinfo-toastertable.html"), 49 template_name="buildinfo-toastertable.html"),
49 name='recipes'), 50 name='recipes'),
50 51
51 url(r'^build/(?P<build_id>\d+)/recipe/(?P<recipe_id>\d+)/active_tab/(?P<active_tab>\d{1})$', 'recipe', name='recipe'), 52 url(r'^build/(?P<build_id>\d+)/recipe/(?P<recipe_id>\d+)/active_tab/(?P<active_tab>\d{1})$', views.recipe, name='recipe'),
52 53
53 url(r'^build/(?P<build_id>\d+)/recipe/(?P<recipe_id>\d+)$', 'recipe', name='recipe'), 54 url(r'^build/(?P<build_id>\d+)/recipe/(?P<recipe_id>\d+)$', views.recipe, name='recipe'),
54 url(r'^build/(?P<build_id>\d+)/recipe_packages/(?P<recipe_id>\d+)$', 'recipe_packages', name='recipe_packages'), 55 url(r'^build/(?P<build_id>\d+)/recipe_packages/(?P<recipe_id>\d+)$', views.recipe_packages, name='recipe_packages'),
55 56
56 url(r'^build/(?P<build_id>\d+)/packages/$', 57 url(r'^build/(?P<build_id>\d+)/packages/$',
57 buildtables.BuiltPackagesTable.as_view( 58 buildtables.BuiltPackagesTable.as_view(
58 template_name="buildinfo-toastertable.html"), 59 template_name="buildinfo-toastertable.html"),
59 name='packages'), 60 name='packages'),
60 61
61 url(r'^build/(?P<build_id>\d+)/package/(?P<package_id>\d+)$', 'package_built_detail', 62 url(r'^build/(?P<build_id>\d+)/package/(?P<package_id>\d+)$', views.package_built_detail,
62 name='package_built_detail'), 63 name='package_built_detail'),
63 url(r'^build/(?P<build_id>\d+)/package_built_dependencies/(?P<package_id>\d+)$', 64 url(r'^build/(?P<build_id>\d+)/package_built_dependencies/(?P<package_id>\d+)$',
64 'package_built_dependencies', name='package_built_dependencies'), 65 views.package_built_dependencies, name='package_built_dependencies'),
65 url(r'^build/(?P<build_id>\d+)/package_included_detail/(?P<target_id>\d+)/(?P<package_id>\d+)$', 66 url(r'^build/(?P<build_id>\d+)/package_included_detail/(?P<target_id>\d+)/(?P<package_id>\d+)$',
66 'package_included_detail', name='package_included_detail'), 67 views.package_included_detail, name='package_included_detail'),
67 url(r'^build/(?P<build_id>\d+)/package_included_dependencies/(?P<target_id>\d+)/(?P<package_id>\d+)$', 68 url(r'^build/(?P<build_id>\d+)/package_included_dependencies/(?P<target_id>\d+)/(?P<package_id>\d+)$',
68 'package_included_dependencies', name='package_included_dependencies'), 69 views.package_included_dependencies, name='package_included_dependencies'),
69 url(r'^build/(?P<build_id>\d+)/package_included_reverse_dependencies/(?P<target_id>\d+)/(?P<package_id>\d+)$', 70 url(r'^build/(?P<build_id>\d+)/package_included_reverse_dependencies/(?P<target_id>\d+)/(?P<package_id>\d+)$',
70 'package_included_reverse_dependencies', name='package_included_reverse_dependencies'), 71 views.package_included_reverse_dependencies, name='package_included_reverse_dependencies'),
71 72
72 url(r'^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)$', 73 url(r'^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)$',
73 buildtables.InstalledPackagesTable.as_view( 74 buildtables.InstalledPackagesTable.as_view(
@@ -75,11 +76,11 @@ urlpatterns = patterns('toastergui.views',
75 name='target'), 76 name='target'),
76 77
77 78
78 url(r'^dentries/build/(?P<build_id>\d+)/target/(?P<target_id>\d+)$', 'xhr_dirinfo', name='dirinfo_ajax'), 79 url(r'^dentries/build/(?P<build_id>\d+)/target/(?P<target_id>\d+)$', views.xhr_dirinfo, name='dirinfo_ajax'),
79 url(r'^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)/dirinfo$', 'dirinfo', name='dirinfo'), 80 url(r'^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)/dirinfo$', views.dirinfo, name='dirinfo'),
80 url(r'^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)/dirinfo_filepath/_(?P<file_path>(?:/[^/\n]+)*)$', 'dirinfo', name='dirinfo_filepath'), 81 url(r'^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)/dirinfo_filepath/_(?P<file_path>(?:/[^/\n]+)*)$', views.dirinfo, name='dirinfo_filepath'),
81 url(r'^build/(?P<build_id>\d+)/configuration$', 'configuration', name='configuration'), 82 url(r'^build/(?P<build_id>\d+)/configuration$', views.configuration, name='configuration'),
82 url(r'^build/(?P<build_id>\d+)/configvars$', 'configvars', name='configvars'), 83 url(r'^build/(?P<build_id>\d+)/configvars$', views.configvars, name='configvars'),
83 url(r'^build/(?P<build_id>\d+)/buildtime$', 84 url(r'^build/(?P<build_id>\d+)/buildtime$',
84 buildtables.BuildTimeTable.as_view( 85 buildtables.BuildTimeTable.as_view(
85 template_name="buildinfo-toastertable.html"), 86 template_name="buildinfo-toastertable.html"),
@@ -97,26 +98,26 @@ urlpatterns = patterns('toastergui.views',
97 98
98 # image information dir 99 # image information dir
99 url(r'^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)/packagefile/(?P<packagefile_id>\d+)$', 100 url(r'^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)/packagefile/(?P<packagefile_id>\d+)$',
100 'image_information_dir', name='image_information_dir'), 101 views.image_information_dir, name='image_information_dir'),
101 102
102 # build download artifact 103 # build download artifact
103 url(r'^build/(?P<build_id>\d+)/artifact/(?P<artifact_type>\w+)/id/(?P<artifact_id>\w+)', 'build_artifact', name="build_artifact"), 104 url(r'^build/(?P<build_id>\d+)/artifact/(?P<artifact_type>\w+)/id/(?P<artifact_id>\w+)', views.build_artifact, name="build_artifact"),
104 105
105 # project URLs 106 # project URLs
106 url(r'^newproject/$', 'newproject', name='newproject'), 107 url(r'^newproject/$', views.newproject, name='newproject'),
107 108
108 url(r'^projects/$', 109 url(r'^projects/$',
109 tables.ProjectsTable.as_view(template_name="projects-toastertable.html"), 110 tables.ProjectsTable.as_view(template_name="projects-toastertable.html"),
110 name='all-projects'), 111 name='all-projects'),
111 112
112 url(r'^project/(?P<pid>\d+)/$', 'project', name='project'), 113 url(r'^project/(?P<pid>\d+)/$', views.project, name='project'),
113 url(r'^project/(?P<pid>\d+)/configuration$', 'projectconf', name='projectconf'), 114 url(r'^project/(?P<pid>\d+)/configuration$', views.projectconf, name='projectconf'),
114 url(r'^project/(?P<pid>\d+)/builds/$', 115 url(r'^project/(?P<pid>\d+)/builds/$',
115 tables.ProjectBuildsTable.as_view(template_name="projectbuilds-toastertable.html"), 116 tables.ProjectBuildsTable.as_view(template_name="projectbuilds-toastertable.html"),
116 name='projectbuilds'), 117 name='projectbuilds'),
117 118
118 # the import layer is a project-specific functionality; 119 # the import layer is a project-specific functionality;
119 url(r'^project/(?P<pid>\d+)/importlayer$', 'importlayer', name='importlayer'), 120 url(r'^project/(?P<pid>\d+)/importlayer$', views.importlayer, name='importlayer'),
120 121
121 # the table pages that have been converted to ToasterTable widget 122 # the table pages that have been converted to ToasterTable widget
122 url(r'^project/(?P<pid>\d+)/machines/$', 123 url(r'^project/(?P<pid>\d+)/machines/$',
@@ -142,7 +143,7 @@ urlpatterns = patterns('toastergui.views',
142 name="projectlayers"), 143 name="projectlayers"),
143 144
144 url(r'^project/(?P<pid>\d+)/layer/(?P<layerid>\d+)$', 145 url(r'^project/(?P<pid>\d+)/layer/(?P<layerid>\d+)$',
145 'layerdetails', name='layerdetails'), 146 views.layerdetails, name='layerdetails'),
146 147
147 url(r'^project/(?P<pid>\d+)/layer/(?P<layerid>\d+)/recipes/$', 148 url(r'^project/(?P<pid>\d+)/layer/(?P<layerid>\d+)/recipes/$',
148 tables.LayerRecipesTable.as_view(template_name="generic-toastertable-page.html"), 149 tables.LayerRecipesTable.as_view(template_name="generic-toastertable-page.html"),
@@ -166,7 +167,7 @@ urlpatterns = patterns('toastergui.views',
166 name="customrecipe"), 167 name="customrecipe"),
167 168
168 url(r'^project/(?P<pid>\d+)/customrecipe/(?P<recipe_id>\d+)/download$', 169 url(r'^project/(?P<pid>\d+)/customrecipe/(?P<recipe_id>\d+)/download$',
169 'customrecipe_download', 170 views.customrecipe_download,
170 name="customrecipedownload"), 171 name="customrecipedownload"),
171 172
172 url(r'^project/(?P<pid>\d+)/recipe/(?P<recipe_id>\d+)$', 173 url(r'^project/(?P<pid>\d+)/recipe/(?P<recipe_id>\d+)$',
@@ -186,9 +187,9 @@ urlpatterns = patterns('toastergui.views',
186 typeaheads.GitRevisionTypeAhead.as_view(), 187 typeaheads.GitRevisionTypeAhead.as_view(),
187 name='xhr_gitrevtypeahead'), 188 name='xhr_gitrevtypeahead'),
188 189
189 url(r'^xhr_testreleasechange/(?P<pid>\d+)$', 'xhr_testreleasechange', 190 url(r'^xhr_testreleasechange/(?P<pid>\d+)$', views.xhr_testreleasechange,
190 name='xhr_testreleasechange'), 191 name='xhr_testreleasechange'),
191 url(r'^xhr_configvaredit/(?P<pid>\d+)$', 'xhr_configvaredit', 192 url(r'^xhr_configvaredit/(?P<pid>\d+)$', views.xhr_configvaredit,
192 name='xhr_configvaredit'), 193 name='xhr_configvaredit'),
193 194
194 url(r'^xhr_layer/(?P<pid>\d+)/(?P<layerversion_id>\d+)$', 195 url(r'^xhr_layer/(?P<pid>\d+)/(?P<layerversion_id>\d+)$',
@@ -200,7 +201,7 @@ urlpatterns = patterns('toastergui.views',
200 name='xhr_layer'), 201 name='xhr_layer'),
201 202
202 # JS Unit tests 203 # JS Unit tests
203 url(r'^js-unit-tests/$', 'jsunittests', name='js-unit-tests'), 204 url(r'^js-unit-tests/$', views.jsunittests, name='js-unit-tests'),
204 205
205 # image customisation functionality 206 # image customisation functionality
206 url(r'^xhr_customrecipe/(?P<recipe_id>\d+)' 207 url(r'^xhr_customrecipe/(?P<recipe_id>\d+)'
@@ -237,4 +238,4 @@ urlpatterns = patterns('toastergui.views',
237 238
238 # default redirection 239 # default redirection
239 url(r'^$', RedirectView.as_view(url='landing', permanent=True)), 240 url(r'^$', RedirectView.as_view(url='landing', permanent=True)),
240) 241]
diff --git a/bitbake/lib/toaster/toastermain/management/commands/buildslist.py b/bitbake/lib/toaster/toastermain/management/commands/buildslist.py
index 8dfef0aa00..70b5812d98 100644
--- a/bitbake/lib/toaster/toastermain/management/commands/buildslist.py
+++ b/bitbake/lib/toaster/toastermain/management/commands/buildslist.py
@@ -1,13 +1,13 @@
1from django.core.management.base import NoArgsCommand, CommandError 1from django.core.management.base import BaseCommand, CommandError
2from orm.models import Build 2from orm.models import Build
3import os 3import os
4 4
5 5
6 6
7class Command(NoArgsCommand): 7class Command(BaseCommand):
8 args = "" 8 args = ""
9 help = "Lists current builds" 9 help = "Lists current builds"
10 10
11 def handle_noargs(self,**options): 11 def handle(self,**options):
12 for b in Build.objects.all(): 12 for b in Build.objects.all():
13 print("%d: %s %s %s" % (b.pk, b.machine, b.distro, ",".join([x.target for x in b.target_set.all()]))) 13 print("%d: %s %s %s" % (b.pk, b.machine, b.distro, ",".join([x.target for x in b.target_set.all()])))
diff --git a/bitbake/lib/toaster/toastermain/settings.py b/bitbake/lib/toaster/toastermain/settings.py
index 1fd649c080..54ab31f302 100644
--- a/bitbake/lib/toaster/toastermain/settings.py
+++ b/bitbake/lib/toaster/toastermain/settings.py
@@ -24,7 +24,6 @@
24import os 24import os
25 25
26DEBUG = True 26DEBUG = True
27TEMPLATE_DEBUG = DEBUG
28 27
29# Set to True to see the SQL queries in console 28# Set to True to see the SQL queries in console
30SQL_DEBUG = False 29SQL_DEBUG = False
@@ -161,12 +160,47 @@ STATICFILES_FINDERS = (
161# Make this unique, and don't share it with anybody. 160# Make this unique, and don't share it with anybody.
162SECRET_KEY = 'NOT_SUITABLE_FOR_HOSTED_DEPLOYMENT' 161SECRET_KEY = 'NOT_SUITABLE_FOR_HOSTED_DEPLOYMENT'
163 162
164# List of callables that know how to import templates from various sources. 163class InvalidString(str):
165TEMPLATE_LOADERS = ( 164 def __mod__(self, other):
166 'django.template.loaders.filesystem.Loader', 165 from django.template.base import TemplateSyntaxError
167 'django.template.loaders.app_directories.Loader', 166 raise TemplateSyntaxError(
168# 'django.template.loaders.eggs.Loader', 167 "Undefined variable or unknown value for: \"%s\"" % other)
169) 168
169TEMPLATES = [
170 {
171 'BACKEND': 'django.template.backends.django.DjangoTemplates',
172 'DIRS': [
173 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
174 # Always use forward slashes, even on Windows.
175 # Don't forget to use absolute paths, not relative paths.
176 ],
177 'OPTIONS': {
178 'context_processors': [
179 # Insert your TEMPLATE_CONTEXT_PROCESSORS here or use this
180 # list if you haven't customized them:
181 'django.contrib.auth.context_processors.auth',
182 'django.template.context_processors.debug',
183 'django.template.context_processors.i18n',
184 'django.template.context_processors.media',
185 'django.template.context_processors.static',
186 'django.template.context_processors.tz',
187 'django.contrib.messages.context_processors.messages',
188 # Custom
189 'django.core.context_processors.request',
190 'toastergui.views.managedcontextprocessor',
191
192 ],
193 'loaders': [
194 # List of callables that know how to import templates from various sources.
195 'django.template.loaders.filesystem.Loader',
196 'django.template.loaders.app_directories.Loader',
197 #'django.template.loaders.eggs.Loader',
198 ],
199 'string_if_invalid': InvalidString("%s"),
200 'debug': DEBUG,
201 },
202 },
203]
170 204
171MIDDLEWARE_CLASSES = ( 205MIDDLEWARE_CLASSES = (
172 'django.middleware.common.CommonMiddleware', 206 'django.middleware.common.CommonMiddleware',
@@ -203,22 +237,6 @@ ROOT_URLCONF = 'toastermain.urls'
203# Python dotted path to the WSGI application used by Django's runserver. 237# Python dotted path to the WSGI application used by Django's runserver.
204WSGI_APPLICATION = 'toastermain.wsgi.application' 238WSGI_APPLICATION = 'toastermain.wsgi.application'
205 239
206TEMPLATE_DIRS = (
207 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
208 # Always use forward slashes, even on Windows.
209 # Don't forget to use absolute paths, not relative paths.
210)
211
212TEMPLATE_CONTEXT_PROCESSORS = ('django.contrib.auth.context_processors.auth',
213 'django.core.context_processors.debug',
214 'django.core.context_processors.i18n',
215 'django.core.context_processors.media',
216 'django.core.context_processors.static',
217 'django.core.context_processors.tz',
218 'django.contrib.messages.context_processors.messages',
219 "django.core.context_processors.request",
220 'toastergui.views.managedcontextprocessor',
221 )
222 240
223INSTALLED_APPS = ( 241INSTALLED_APPS = (
224 'django.contrib.auth', 242 'django.contrib.auth',
@@ -348,10 +366,4 @@ connection_created.connect(activate_synchronous_off)
348# 366#
349 367
350 368
351class InvalidString(str):
352 def __mod__(self, other):
353 from django.template.base import TemplateSyntaxError
354 raise TemplateSyntaxError(
355 "Undefined variable or unknown value for: \"%s\"" % other)
356 369
357TEMPLATE_STRING_IF_INVALID = InvalidString("%s")
diff --git a/bitbake/lib/toaster/toastermain/urls.py b/bitbake/lib/toaster/toastermain/urls.py
index 1f8599edc3..bb325596bb 100644
--- a/bitbake/lib/toaster/toastermain/urls.py
+++ b/bitbake/lib/toaster/toastermain/urls.py
@@ -23,6 +23,8 @@ from django.conf.urls import patterns, include, url
23from django.views.generic import RedirectView 23from django.views.generic import RedirectView
24from django.views.decorators.cache import never_cache 24from django.views.decorators.cache import never_cache
25 25
26import bldcollector.views
27
26import logging 28import logging
27 29
28logger = logging.getLogger("toaster") 30logger = logging.getLogger("toaster")
@@ -31,7 +33,7 @@ logger = logging.getLogger("toaster")
31from django.contrib import admin 33from django.contrib import admin
32admin.autodiscover() 34admin.autodiscover()
33 35
34urlpatterns = patterns('', 36urlpatterns = [
35 37
36 # Examples: 38 # Examples:
37 # url(r'^toaster/', include('toaster.foo.urls')), 39 # url(r'^toaster/', include('toaster.foo.urls')),
@@ -42,11 +44,11 @@ urlpatterns = patterns('',
42 44
43 # This is here to maintain backward compatibility and will be deprecated 45 # This is here to maintain backward compatibility and will be deprecated
44 # in the future. 46 # in the future.
45 url(r'^orm/eventfile$', 'bldcollector.views.eventfile'), 47 url(r'^orm/eventfile$', bldcollector.views.eventfile),
46 48
47 # if no application is selected, we have the magic toastergui app here 49 # if no application is selected, we have the magic toastergui app here
48 url(r'^$', never_cache(RedirectView.as_view(url='/toastergui/', permanent=True))), 50 url(r'^$', never_cache(RedirectView.as_view(url='/toastergui/', permanent=True))),
49) 51]
50 52
51import toastermain.settings 53import toastermain.settings
52 54