From d086fa3aed34a05d52e73c255ca22379149a64a1 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Mon, 20 Jan 2014 09:39:34 +0000 Subject: bitbake: toasterui: add extra debug and development infos We update and add logs throughout the code in order to help with development. The extra logging is turned off by default, but it can be enabled by using environment variables. All logging happens through the Python logging facilities. The toaster UI will save a log of all incoming events if the TOASTER_EVENTLOG variable is set. If TOASTER_SQLDEBUG is set all DB queries will be logged. If TOASTER_DEVEL is set and the django-fresh module is available, the module is enabled to allow auto-reload of pages when the source is changed. (Bitbake rev: 10c27450601b4d24bbb273bd0e053498807d1060) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastermain/urls.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'bitbake/lib/toaster/toastermain/urls.py') diff --git a/bitbake/lib/toaster/toastermain/urls.py b/bitbake/lib/toaster/toastermain/urls.py index 549fda12d6..a2916e2dd7 100644 --- a/bitbake/lib/toaster/toastermain/urls.py +++ b/bitbake/lib/toaster/toastermain/urls.py @@ -44,11 +44,15 @@ urlpatterns = patterns('', ) import toastermain.settings + +if toastermain.settings.FRESH_ENABLED: + urlpatterns.insert(1, url(r'', include('fresh.urls'))) + if toastermain.settings.MANAGED: - urlpatterns = urlpatterns + [ + urlpatterns = [ # Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), - ] + ] + urlpatterns # Automatically discover urls.py in various apps, beside our own # and map module directories to the patterns @@ -61,4 +65,4 @@ for t in os.walk(os.path.dirname(currentdir)): if "urls.py" in t[2] and t[0] != currentdir: modulename = os.path.basename(t[0]) - urlpatterns.append( url(r'^' + modulename + '/', include ( modulename + '.urls'))) + urlpatterns.insert(0, url(r'^' + modulename + '/', include ( modulename + '.urls'))) -- cgit v1.2.3-54-g00ecf