summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastermain/urls.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-08-08 17:17:13 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-29 13:56:49 +0100
commit54530006b745d364d60dcf4ce372a1459d3fff78 (patch)
tree72d40fa827dd19dbad4d77f63266cd3ac6ba6c04 /bitbake/lib/toaster/toastermain/urls.py
parent234226b9055a3b23addcdaa7a77812dc7aa79134 (diff)
downloadpoky-54530006b745d364d60dcf4ce372a1459d3fff78.tar.gz
bitbake: toaster: enable admin interface on select models
We enable the admin interface in Toaster. We add admin models for Build Environments (where the sysadmin can configure where the builds take place) and for Layer Sources (marking the upstream provider for layer information). The admin interface and associated data are enabled only for the MANAGED version. (Bitbake rev: 6618613c9210fb44d36d90f5f2404b435f10dfc8) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastermain/urls.py')
-rw-r--r--bitbake/lib/toaster/toastermain/urls.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/bitbake/lib/toaster/toastermain/urls.py b/bitbake/lib/toaster/toastermain/urls.py
index 0e7b5c2d77..1ae6245cc3 100644
--- a/bitbake/lib/toaster/toastermain/urls.py
+++ b/bitbake/lib/toaster/toastermain/urls.py
@@ -25,11 +25,12 @@ from django.views.decorators.cache import never_cache
25 25
26 26
27# Uncomment the next two lines to enable the admin: 27# Uncomment the next two lines to enable the admin:
28# from django.contrib import admin 28from django.contrib import admin
29# admin.autodiscover() 29admin.autodiscover()
30
30urlpatterns = patterns('', 31urlpatterns = patterns('',
32 # the api-s are not auto-discoverable
31 url(r'^api/1.0/', include('bldviewer.api')), 33 url(r'^api/1.0/', include('bldviewer.api')),
32 url(r'^$', never_cache(RedirectView.as_view(url='/toastergui/'))),
33 34
34 # Examples: 35 # Examples:
35 # url(r'^toaster/', include('toaster.foo.urls')), 36 # url(r'^toaster/', include('toaster.foo.urls')),
@@ -37,10 +38,17 @@ urlpatterns = patterns('',
37 # Uncomment the admin/doc line below to enable admin documentation: 38 # Uncomment the admin/doc line below to enable admin documentation:
38 # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), 39 # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
39 40
40 # Uncomment the next line to enable the admin: 41
41 # url(r'^admin/', include(admin.site.urls)), 42 # if no application is selected, we have the magic toastergui app here
43 url(r'^$', never_cache(RedirectView.as_view(url='/toastergui/'))),
42) 44)
43 45
46import toastermain.settings
47if toastermain.settings.MANAGED:
48 urlpatterns = urlpatterns + [
49 # Uncomment the next line to enable the admin:
50 url(r'^admin/', include(admin.site.urls)),
51 ]
44# Automatically discover urls.py in various apps, beside our own 52# Automatically discover urls.py in various apps, beside our own
45# and map module directories to the patterns 53# and map module directories to the patterns
46 54